Results 1 to 9 of 9

Thread: Combobox picker issue

    This duplicates another forum thread, you can visit that thread here.
  1. #1
    Sencha User
    Join Date
    Nov 2014
    Posts
    11

    Default Combobox picker issue

    Hi, I have come across a combo box picker issue where when you start typing, the dropdown picker list shows matching values, but when you hit backspace and clear the field, the dropdown picker is gone, and when you click on the down arrow icon, the picker only shows values that start with the last character you backspaced. There is no way to get all the values in the list after this point. This is a problem and needs to be fixed. I would appreciate any insight on this or any workaround.

    I have created an example on fiddle -
    https://fiddle.sencha.com/#fiddle/lln

    Just type T in the combobox and the picker shows Texas, now delete T from the field, the picker is gone. Expand the picker again, you will still see Texas and all the other states are missing.

    Thanks in advance.

  2. #2
    Sencha Premium User westy's Avatar
    Join Date
    Feb 2009
    Location
    Bath, UK
    Posts
    1,037
    Product Architect
    Altus Ltd.

  3. #3
    Sencha - Sustaining Engineer tristan.lee's Avatar
    Join Date
    Mar 2015
    Location
    Central Ohio
    Posts
    1,579

    Default

    Hi,

    As mentioned above, this issue has been fixed for 5.1.1 and the latest nightly build.

    https://fiddle.sencha.com/#fiddle/ln9


    Thanks for reporting,
    Tristan

  4. #4
    Sencha User
    Join Date
    Nov 2014
    Posts
    11

    Default

    Thanks! When is 5.1.1 scheduled to be released? Any possible workarounds until then?

  5. #5
    Sencha - Sustaining Engineer tristan.lee's Avatar
    Join Date
    Mar 2015
    Location
    Central Ohio
    Posts
    1,579

    Default

    At this time, I don't have any dates available regarding the release.

    Thanks,
    Tristan

  6. #6
    Sencha User
    Join Date
    Nov 2014
    Posts
    11

    Default

    Okay, thanks. Any possible workarounds you can think of?

  7. #7
    Sencha Premium User westy's Avatar
    Join Date
    Feb 2009
    Location
    Bath, UK
    Posts
    1,037

    Post

    Quote Originally Posted by gburugu View Post
    Okay, thanks. Any possible workarounds you can think of?
    There was a fix in the linked thread.

    So you need something like:
    Code:
    Ext.define('Altus.overrides.form.field.ComboBox', {
        override: 'Ext.form.field.ComboBox',
    
    
        doLocalQuery: function(queryPlan) {
            var me = this,
                queryString = queryPlan.query,
                filters = me.getStore().getFilters(),
                filter = me.queryFilter;
    
    
            me.queryFilter = null;
            me.changingFilters = true;
            filters.beginUpdate();
            if (filter) {
                filters.remove(filter);
            }
    
    
            // Querying by a string...
            if (queryString || queryString === '') {
                filter = me.queryFilter = new Ext.util.Filter({
                    id: me.id + '-filter',
                    anyMatch: me.anyMatch,
                    caseSensitive: me.caseSensitive,
                    root: 'data',
                    property: me.displayField,
                    value: me.enableRegEx ? new RegExp(queryString) : queryString
                });
                filters.add(filter);
            }
            filters.endUpdate();
            me.changingFilters = false;
    
    
            // Expand after adjusting the filter if there are records or if emptyText is configured.
            if (me.store.getCount() || me.getPicker().emptyText) {
                me.expand();
            } else {
                me.collapse();
            }
    
    
            me.afterQuery(queryPlan);
        }
    });
    Just cobbled that together, since we put the fix in our own combo extension, so apologies if doesn't lint or something...

    Cheers,
    Westy
    Product Architect
    Altus Ltd.

  8. #8
    Sencha User
    Join Date
    Nov 2014
    Posts
    11

    Default

    Wow!! Thanks Westy, it works. One issue, (not so much of an issue however) is when I clear the last character the dropdown picker disappears, I can bring it back by clicking down arrow though.

  9. #9
    Sencha Premium User westy's Avatar
    Join Date
    Feb 2009
    Location
    Bath, UK
    Posts
    1,037

    Default

    No worries. That sounds like it's due to type-ahead no longer being active.
    Product Architect
    Altus Ltd.

Similar Threads

  1. Date Picker Issue
    By subendu in forum Sencha GXT Q&A
    Replies: 1
    Last Post: 25 Feb 2013, 12:33 PM
  2. picker/selectfield build issue
    By mcaple in forum Sencha Touch 2.x: Q&A
    Replies: 2
    Last Post: 29 Mar 2012, 3:15 PM
  3. [FIXED] Incomplete setValue() on Ext.picker.Picker (and Ext.picker.Slot) before render/show.
    By strictlyphp in forum Sencha Touch 2.x: Bugs
    Replies: 3
    Last Post: 10 Feb 2012, 2:59 PM
  4. [2.??] Picker issue
    By d0uble_hel1x in forum Ext 2.x: Bugs
    Replies: 3
    Last Post: 30 Jun 2008, 9:19 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •