Ext version tested: Browser versions tested against: DOCTYPE tested against: Description:

  • Error when calling reconfigure on a grid with filtering plugin and passing null as the store value.


Steps to reproduce the problem:

  • call reconfigure(null, colModel) on a grid with filtering enabled.


Since we are passing null as the store value, the code below needs to be modified to handle this.

I'm not sure if we should just pass beginUpdate and endUpdate calls, or point store to the original grid store.

Also, should we be calling bindStore when store == null?



Code:



onBeforeReconfigure: function (grid, store, columns) {
if (columns) {
store.getFilters().beginUpdate();
}
this.reconfiguring = true;
},

onReconfigure: function (grid, store, columns, oldStore) {
var me = this;
if (oldStore !== store) {
me.bindStore(store);
}
if (columns) {
me.initColumns();
store.getFilters().endUpdate();
}
me.reconfiguring = false;
}



Here's my current override:


Code:



onBeforeReconfigure: function (grid, store, columns) {
if (columns && store) {
store.getFilters().beginUpdate();
}


this.reconfiguring = true;
},


onReconfigure: function (grid, store, columns, oldStore) {
var me = this;


if (store && oldStore !== store) {
me.bindStore(store);
}


if (columns) {
me.initColumns();
if(store) {
store.getFilters().endUpdate();
}
}


me.reconfiguring = false;
}