1. #1
    Sencha User
    Join Date
    Aug 2013
    Posts
    1
    Vote Rating
    1
    yhosun is on a distinguished road

      1  

    Default disabling expanding combobox when the label is clicked

    disabling expanding combobox when the label is clicked


    The comobox expands the list of values when the label is clicked. (Ext JS 3.4.0)
    It happens only when the editable config is true.

    Do you know how to make a non-editable combobox not to expand by the label click?

    JSFIDDLE: http://jsfiddle.net/yhosun/bRgnY/8/
    If you click the label of first combobox "editable FALSE", the list will expand, and if the "editable TRUE" label is clicked, it will not expand.

    Code:
    items: [{
                xtype: 'container',
                layout: 'form',
                items: [{
                    xtype: 'combo',
                    editable: false,
                    triggerAction: 'all',
                    mode: 'local',
                    store: store,
                    valueField: 'myId',
                    displayField: 'displayText',
                    fieldLabel: 'editable FALSE'
                }]
            },{
                xtype: 'container',
                layout: 'form',
                items: [{
                    xtype: 'combo',
                    editable: true,
                    triggerAction: 'all',
                    mode: 'local',
                    store: store,
                    valueField: 'myId',
                    displayField: 'displayText',
                    fieldLabel: 'editable TRUE'
                }]
            }]

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    5,010
    Vote Rating
    183
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      1  

    Default


    Clicking on the label will focus the field it's associated with - same as if you had clicked directly on the field itself. So, for the editable field clicking on it places the cursor active in the field. And on the non-editable field it expands the picker.

Thread Participants: 1

Tags for this Thread