1. #1
    Ext JS Premium Member dnorman's Avatar
    Join Date
    Jan 2011
    Posts
    101
    Vote Rating
    21
    dnorman will become famous soon enough dnorman will become famous soon enough

      1  

    Default combobox boundlist width

    combobox boundlist width


    Recently upgraded to 4.1rc1, and I'm trying to figure out how to get combobox boundlists to auto-width-ify themselves.

    The combo boxen in question have matchFieldWidth: false. under 4.0.7 This was broken, and required the following patch:

    Code:
    Ext.override(Ext.form.field.Picker, {
        alignPicker: function() {
            var me = this,
                picker = me.getPicker();
    
    
            if (me.isExpanded) {
                if (me.matchFieldWidth) {
                    // Auto the height (it will be constrained by min and max width) unless there are no records to display.
                    picker.setWidth(me.bodyEl.getWidth());
    
    
                } else { // MODIFIED - this else block added 
                    picker.setSize(
                        me.listConfig ? me.listConfig.width || null : null,
                        ( picker.store && picker.store.getCount() ) ? null : 0
                    );
                }
                if (picker.isFloating()) {
                    me.doAlign();
                }
            }
        }
    });
    Now, under 4.1rc1, the patch is no longer necessary to support matchFieldWidth:false, but the trouble is: unless you set an explicit width, it'll use the minWidth value to set the actual width style.

    I don't know what other components this might apply to, but even picker.setWidth(null) or picker.setWidth('auto') now appear to be ineffectual. ( picker is an Ext.view.BoundList )
    It won't un-set the width style on the boundlist as it so graciously did before.

    I'd attempt to debug this more myself, but the guts of the new layout system appear to be manifest of some freaky black-magic that I do not yet understand.

    How do we restore this little gem of functionality?

  2. #2
    Sencha User skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,338
    Vote Rating
    248
    skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of

      0  

    Default


    I had a go at reproducing this issue using the following test case:

    Code:
    Ext.create('Ext.form.field.ComboBox', {
        matchFieldWidth: false,
        renderTo: ...,
        store: ['Red', 'Orange', 'Yellow Lorry Red Lorry Green Lorry']
    });
    It renders fine initially but goes wrong once you start typing in values.

    If this is the same problem, it seems to be fixed in the latest nightly build.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar