1. #1
    Ext JS Premium Member dnorman's Avatar
    Join Date
    Jan 2011
    Posts
    101
    Vote Rating
    38
    dnorman has a spectacular aura about dnorman has a spectacular aura about dnorman has a spectacular aura about

      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 Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,581
    Vote Rating
    319
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      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

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi