View Full Version : [FIXED-492][3.1] GridFilter breaks when state is applied

11 Jan 2010, 6:58 AM
When saving state GridFilter stores a field named filters on the state object (GridFilters.js ~ line 274). This name coincides with the name GridFilter uses to add its self to the grid in init (GridFilters.js ~ line 206). When the component goes to restore state it just does Ext.apply(this, state) which will step on filters defined above. Probably not a common problem, but I have to interact with the filters object and it sucks when all the methods disappear.

Two possible fixes: rename the filters property being stored in the state object or delete filters in the applyState method of GridFilters. I have implemented #2:

applyState : function (grid, state) {
var key, filter;
this.applyingState = true;
if (state.filters) {
for (key in state.filters) {
filter = this.filters.get(key);
if (filter) {
if (this.local) {
delete state.filters;
delete this.applyingState;

27 Jan 2010, 12:33 AM
I have also run into this issue, as detailed here with a testcase: http://www.extjs.com/forum/showthread.php?t=90544

Its happening in Ext 3.1.0. Tested in Chrome and Firefox on Windows, but should happen no matter what browser and what OS. Could this be fixed for Ext 3.1.1?

27 Jan 2010, 2:10 AM
See also: http://www.extjs.com/forum/showthread.php?p=431375#post431375

31 Mar 2010, 11:47 PM
What is holding this on? Just a small one-liner which fixes a known Bug? We have to patch ExtJS specifically because of this Bug... :-(

9 Apr 2010, 7:22 PM
Fixed in SVN, rev 6486.