[CLOSED] SelectBox difference in 2.5 and 3.2 version

  1. #1

    [CLOSED] SelectBox difference in 2.5 and 3.2 version

    Hai,

    In the earlier version if we do a search based on input character, the SELECTBOX will focus to the first item of the input character and it shows the remaining items(If it has multiple) in the expanded view.

    But in the current 3.2.x version the first item get's selected by default and it's not possible to view the remaining items in the expanded view.


    NOTE: DO refer the attached screenshot.
    We would like to have the same existing 2.5 functionality with the SELECTBOX. Please provide us a solution.
    Attached Thumbnails SelectBox.png  
    Last edited by Daniil; Jan 27, 2016 at 9:42 AM. Reason: [CLOSED]
  2. #2
    Hello!

    To mimic the v2.x behavior you can add this script to your page:

    Ext.define('Ext.form.field.ComboBox', {
        override: 'Ext.form.field.ComboBox',
        onValueCollectionEndUpdate: function () {
            var me = this,
                store = me.store,
                selectedRecords = me.valueCollection.getRange(),
                selectedRecord = selectedRecords[0],
                selectionCount = selectedRecords.length;
            me.updateBindSelection(me.pickerSelectionModel, selectedRecords);
            if (me.isSelectionUpdating()) {
                return;
            }
            Ext.suspendLayouts();
            me.lastSelection = selectedRecords;
            if (selectionCount) {
                me.lastSelectedRecords = selectedRecords;
            }
            me.updateValue();
            Ext.resumeLayouts(true);
            if (selectionCount && !me.suspendCheckChange) {
                if (!me.multiSelect) {
                    selectedRecords = selectedRecord;
                }
                me.fireEvent('select', me, selectedRecords);
            }
        }
    });
    I hope this helps!
    Last edited by fabricio.murta; Jan 21, 2016 at 6:36 PM.
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Replies: 2
    Last Post: Jan 13, 2015, 8:55 PM
  2. Replies: 1
    Last Post: Sep 09, 2012, 5:12 PM
  3. Replies: 1
    Last Post: Mar 12, 2012, 9:31 PM
  4. Replies: 4
    Last Post: Oct 24, 2011, 3:34 AM
  5. Replies: 2
    Last Post: Jan 26, 2010, 12:54 PM

Posting Permissions