[CLOSED] Combobox BindStore remove filter functionality

  1. #1

    [CLOSED] Combobox BindStore remove filter functionality

    Hi,

    We have two combobox and second combobox store change by first combo selection. first time It's working well but second and onward it's stop filtering.
    e.g. on Study_Type change we bind Study_Subtype store using bindStore, as I describe above Study_Subtype destroy their filter functionality.

    Ext.define('MyApp.view.MyStudyType', {
        extend: 'Ext.form.FieldContainer',
        width: 908,
        layout: {
            type: 'hbox'
        },
        fieldLabel: '',
        customStore: ["Harm","Therapy"],
        customStoreTherapy: ["Therapy1", "Therapy2", "Therapy3", "Therapy4", "Therapy5", "Therapy6"],
        customHarm: ["Harm1", "Harm2"],
        row: 1,
        initComponent: function () {
            var me = this;
            Ext.applyIf(me, {
                items: [
                    {
                        xtype: 'myDropdown',
                        margins: '3px 5px 3px 5px',
                        width: 130,
                        store: me.customStore,
                        queryMode: 'local',
                        name: 'Study_Type',
                        emptyText: 'Study Type',
                        listeners: {
                            change: { fn: me.onTypeNameChange, scope: me },
                            select: { fn: me.onTypeNameSelect, scope: me }
                        }
                    },
                    {
                        xtype: 'myDropdown',
                        margins: '3px 5px 3px 5px',
                        width: 166,
                        store: me.customStoreTherapy,
                        name: 'Study_Subtype',
                        emptyText: 'Study Subtype',
                        hidden: true,
                        queryMode: 'local',
                        isHide: true,
                        row: me.row,
                        column: 2,
                        listeners: {
                            change: { fn: me.onOtherTypeNameChange, scope: me },
                            select: { fn: me.onOtherTypeNameSelect, scope: me }
                        }
                    }
                ]
            });
    
            me.callParent(arguments);
        },
        onTypeNameChange: function (combo, newValue, oldValue, eOpts) {
            var a = combo.up();
            if (newValue == "Therapy") {
                a.query("[name='Study_Subtype']")[0].setValue('');
                a.query("[name='Study_Subtype']")[0].bindStore(this.customStoreTherapy);
                a.query("[name='Study_Subtype']")[0].show();
            }
            else if (newValue == "Harm") {
                a.query("[name='Study_Subtype']")[0].setValue('');
                a.query("[name='Study_Subtype']")[0].bindStore(this.customHarm);
                a.query("[name='Study_Subtype']")[0].show();
            }
    
        }
    });
    Combobox BindStore remove filter functionality
    Last edited by fabricio.murta; Mar 24, 2017 at 3:49 PM. Reason: No user feedback in 7+ days
  2. #2
    Hello @amitpareek!

    I've moved your thread from community forums to premium 4.x as I see you have a premium subscription according to the forums group you are part of.

    Can you provide a runnable test case for the custom ExtJS code you shared so we can try and reproduce the issue on our side?
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Replies: 2
    Last Post: Apr 10, 2015, 1:59 PM
  2. Replies: 7
    Last Post: Jan 20, 2015, 6:06 PM
  3. Filter with Refresh functionality
    By shaileshsakaria in forum 2.x Help
    Replies: 0
    Last Post: Jan 18, 2013, 12:11 PM
  4. Replies: 8
    Last Post: Dec 19, 2011, 9:03 AM
  5. how remove group and filter
    By maxdiable in forum 1.x Help
    Replies: 2
    Last Post: Jan 24, 2010, 5:08 AM

Tags for this Thread

Posting Permissions