• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Drop Down

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Drop Down

    I'm trying to see if there's a way to prevent a drop down from being input capable. The on screen keyboard is triggered every time on touchscreen / convertible devices.

  • #2
    We currently don't have a way to set this on dropdowns; however, we will add this as a feature request.

    For now, you could add the below script to your behaviors/Application/Startup/Execute Script, which will set all dropdowns in the application to prevent input

    Code:
    if (Ext.isDesktop) {
        // prevent input on all dropdowns
        //
        const setDropdowns = function(cmp) {
            if (!Valence.isEmpty(cmp) && typeof cmp.query === 'function') {
                const dropdowns = cmp.query('combobox');
    
                for (let index = 0; index < dropdowns.length; index++) {
                    const element = dropdowns[index];
    
                    if (typeof element.setEditable === 'function') {
                        element.setEditable(false);
                    }
                }
            }
        };
    
        setDropdowns(Ext.ComponentQuery.query('app-main')[0]);
    
        // listen for show to handle popups
        //
        Ext.GlobalEvents.on('show', function(cmp){
            setDropdowns(cmp);
        });
    }
    
    success();

    Comment


    • #3
      That worked. Thanks.

      Comment

      Working...
      X