[FIXED] [#744] [3.2.0] Combobox using custom dropdown

  1. #1

    [FIXED] [#744] [3.2.0] Combobox using custom dropdown

    Use your examples page to reproduce this
    https://examples3.ext.net/#/Form/ComboBox/Overview/


    In the custom item templates example enter d and the dropdown correctly lists 2 items starting with d.
    Delete the character d you just typed and then use the trigger to view the dropdown.
    It still shows just the two D items.
    There is no way to revert to the full list.

    I reproduced this on Win8.1 using IE11, IE11 in v10 compatibility and Chrome (40.0.2214.115 m)

    I am also using the crisp theme and on IE the clear icon trigger shows but on Chrome it does not.
    Last edited by Daniil; Jun 23, 2015 at 2:28 PM. Reason: [FIXED] [#744] [3.2.0]
  2. #2
    At version 2.5 it works as expected: https://examples2.ext.net/#/Form/ComboBox/Overview/.
  3. #3
    Hello Raphael!

    Win 8.1 and IE11 here. Please just click out the ComboBox (to lose focus) after you erase 'd' and then click back. You'll see the full list.
    Fabrício Murta
    Developer & Support Expert
  4. #4
    Win 8.1 and IE11 here. Please just click out the ComboBox (to lose focus) after you erase 'd' and then click back. You'll see the full list.
    It's not the scenario presented by @PeterParsonage.
  5. #5
    Also the losing of focus does not always bring back the full menu.

    Today I have reverted back to 2.5.3. There's just too many problems frustrating to the user in this latest version. 3.1 did fix some of them but I can't train basic users with how to use a combobox that's different to everything else they've previously done.
  6. #6
    Thank you for the report. Created an Issue:
    https://github.com/extnet/Ext.NET/issues/744

    Please try this fix:
    Ext.form.field.ComboBox.override({
        onFieldMutation: function (e) {
            var me = this,
                key = e.getKey(),
                isDelete = key === e.BACKSPACE || key === e.DELETE,
                rawValue = me.inputEl.dom.value,
                len = rawValue.length;
    
            // Do not process two events for the same mutation.
            // For example an input event followed by the keyup that caused it.
            // We must process delete keyups.
            // Also, do not process TAB event which fires on arrival.
            if (!me.readOnly && (rawValue !== me.lastMutatedValue || isDelete) && key !== e.TAB) {
                me.lastMutatedValue = rawValue;
                me.lastKey = key;
                if (/* len && */(e.type !== 'keyup' || (!e.isSpecialKey() || isDelete))) { // #744: removed "len &&" condition
                    me.doQueryTask.delay(me.queryDelay);
                } else {
                    // We have *erased* back to empty if key is a delete, or it is a non-key event (cut/copy)
                    if (!len && (!key || isDelete)) {
                        // Essentially a silent setValue.
                        // Clear our value, and the tplData used to construct a mathing raw value.
                        if (!me.multiSelect) {
                            me.value = null;
                            me.displayTplData = undefined;
                        }
                        // Just erased back to empty. Hide the dropdown.
                        me.collapse();
    
                        // There may have been a local filter if we were querying locally.
                        // Clear the query filter and suppress the consequences (we do not want a list refresh).
                        if (me.queryFilter) {
                            // Must set changingFilters flag for this.checkValueOnChange.
                            // the suppressEvents flag does not affect the filterchange event
                            me.changingFilters = true;
                            me.store.removeFilter(me.queryFilter);
                            me.changingFilters = false;
                        }
                    }
                    me.callParent([e]);
                }
            }
        }
    });
  7. #7
    Thanks Daniil. As always, you guys are really fast with solutions/work arounds.
  8. #8
    It has been fixed in SVN trunk. The fix will go to the upcoming Ext.NET 3.2.0 release.

Similar Threads

  1. [CLOSED] Combobox with Treepanel as dropdown control
    By RCM in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Sep 13, 2013, 3:39 AM
  2. [CLOSED] ComboBox dropdown list orientation
    By vadym.f in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 05, 2013, 2:13 AM
  3. [CLOSED] Combobox dropdown list size
    By Antonio09 in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 16, 2013, 12:03 AM
  4. Pre-selecting value from dropdown (ComboBox)
    By kristou in forum 2.x Help
    Replies: 1
    Last Post: Nov 21, 2012, 12:43 PM
  5. Replies: 2
    Last Post: May 14, 2011, 6:29 PM

Posting Permissions