Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-7273 in 5.0.0.970.
  1. #1
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    977
    Vote Rating
    113
    Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all

      0  

    Default [4.1.1 GA] FiltersFeature automatic reconfiguring seems to be not impemented

    [4.1.1 GA] FiltersFeature automatic reconfiguring seems to be not impemented


    REQUIRED INFORMATION

    Ext version tested:
    • Ext 4.1.1 GA
    Description:
    • There is the following phrase in the docs for FiltersFeature.
    Automatic Reconfiguration:

    Filters automatically reconfigure when the grid 'reconfigure' event fires.

    http://docs.sencha.com/ext-js/4-1/#!/api/Ext.ux.grid.FiltersFeature

    • But, actually, I can't find anything in the FiltersFeature sources related to handling the grid's reconfigure event.
    • In particular, a new store is not bound to the filters after calling .reconfigure(newStore). It is easy to bind calling the bindStore method of FiltersFeature, but I just pointing the problem out.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,647
    Vote Rating
    899
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Do you have a test case to show that they do not?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    977
    Vote Rating
    113
    Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all

      0  

    Default


    Hi Mitchell,

    Thank you for the response. Apologize, I will provide it soon, probably, tomorrow. Just going to sleep now

  4. #4
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    977
    Vote Rating
    113
    Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all

      0  

    Default


    I prepared the following test case. Actually, it is a fake, but reproduces the problem.

    Tested with Chrome.
    • Steps
    1. Run the sample
    2. Try to filter. Please ignore "not found" error. The main thing is the fact that the "filter" parameter is sent with a request.
    3. Click the Reconfigure Button.
    4. Try to filter. There is no "filter" parameter in a request anymore.
    • Test case
    Code:
    <html>
    <head>
        <title>Filters reconfigure</title>
    
        <link type="text/css" rel="stylesheet" href="../resources/css/ext-all.css" />
    
        <script type="text/javascript" src="../ext-all-debug.js"></script>
    
        <script type="text/javascript">
            Ext.Loader.setConfig({enabled: true});
            Ext.Loader.setPath('Ext.ux', '../examples/ux');
            Ext.require([
                'Ext.grid.*',
                'Ext.data.*',
                'Ext.ux.grid.FiltersFeature'
            ]);
    
            var createStore = function () {
                return new Ext.data.Store({
                    autoLoad: false,
                    fields: [{
                        name: "test"
                    }],
                    proxy: {
                        type: "ajax",
                        url: "test.htm"
                    }
                });
            };
    
            Ext.onReady(function () {
                Ext.create("Ext.button.Button", {
                    renderTo: Ext.getBody(),
                    text: "Reconfigure",
                    handler: function () {
                        var newStore = createStore();
    
                        Ext.getCmp("GridPanel1").reconfigure(newStore);
                        // The filters are sent if uncoment this line:
                        //Ext.getCmp("GridPanel1").filters.bindStore(newStore);
                    }
                });
    
                Ext.create("Ext.grid.Panel", {
                    id: "GridPanel1",
                    renderTo: Ext.getBody(),
                    store: createStore(),
                    columns: {
                        items: [{
                            dataIndex: "test",
                            text: "Test"
                        }]
                    },
                    features: [Ext.create("Ext.ux.grid.FiltersFeature", {
                        filters: [{
                            dataIndex: "test",
                            type: "string"
                        }]
                    })]
                });
            });
        </script>
    </head>
    <body>
    
    </body>
    </html>
    • Screenshots
    1. Before reconfiguring.
    2. After reconfiguring.
    • Solution
    I call
    Code:
    Ext.getCmp("GridPanel1").filters.bindStore(newStore);
    It fixes the problem.

    So, actually, it is not a big deal for me. I just pointed the problem out when red "automatic reconfiguring" in the docs, but, actually, not found any code in FiltersFeature related to reconfiguring. It is just an attempt to make ExtJS a bit better
    Attached Images

  5. #5
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    977
    Vote Rating
    113
    Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all

      0  

    Default


    Hi Mitchell,

    Did you have a chance to look at the test case?

  6. #6
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,647
    Vote Rating
    899
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Yes, I have opened a bug in our bug tracker.

  7. #7
    Ext JS Premium Member
    Join Date
    Apr 2010
    Location
    Montréal, Canada
    Posts
    221
    Vote Rating
    5
    Christiand is on a distinguished road

      1  

    Default


    I have had the same problem. In the Ext.ux.grid.FiltersFeature class, add in the attachEvents method:

    Code:
        attachEvents: function() {
            var me = this,
                view = me.view,
                headerCt = view.headerCt,
                grid = me.getGridPanel(),
                store = view.getStore();
    
    
    
    
            me.bindStore(store, true);
    
    
            //<added>
            grid.on('reconfigure', me.onReconfigure, me);
            //</added>
    
    
            // Listen for header menu being created
            headerCt.on('menucreate', me.onMenuCreate, me);
    
    
            view.on('refresh', me.onRefresh, me);
            grid.on({
                scope: me,
                beforestaterestore: me.applyState,
                beforestatesave: me.saveState,
                beforedestroy: me.destroy
            });
    
    
            // Add event and filters shortcut on grid panel
            grid.filters = me;
            grid.addEvents('filterupdate');
        },
    and add the onReconfigure to the same class:

    Code:
        onReconfigure: function(grid, store){
            //<debug>
            console.log('grid has been reconfigured, reBinding store..');
            //</debug>
            this.bindStore(store, true);
        }

  8. #8
    Sencha Premium Member
    Join Date
    Jul 2013
    Location
    Singapore
    Posts
    24
    Vote Rating
    2
    bfrei is on a distinguished road

      0  

    Default 4.2.2 still not implemented

    4.2.2 still not implemented


    Bump. Looking at the source, this is still not implemented in 4.2.2... Maybe the online docs could be updated?