View Full Version : Lockable grid giving a string instead of a Ext.data.Store on reconfigure event

whirling dervish
31 Jan 2013, 3:29 PM
So I am seeing a really odd issue where lockable ('enableLocking: true') grids are firing reconfigure events with a string instead of a store object.

The string itself is the correct store class, so I can workaround the issue by downing a StoreManager lookup, but I have no idea why this isn't obeying the documented event signature.

Is this a bug or do I have reconfigure locked grid stores differently?

EDIT: Looking into this more this looks more and more like a bug,

So this is the definition of reconfigure in Ext.panel.Table,

reconfigure: function(store, columns) {
var me = this,
view = me.getView(),
oldStore = me.store,
headerCt = me.headerCt,
oldColumns = headerCt ? headerCt.items.getRange() : me.columns;

// Make copy in case the beforereconfigure listener mutates it.
if (columns) {
columns = Ext.Array.slice(columns);

me.fireEvent('beforereconfigure', me, store, columns, oldStore, oldColumns);
if (me.lockable) {
me.reconfigureLockable(store, columns);
} else {
if (columns) {
// new columns, delete scroll pos
delete me.scrollLeftPos;
if (store) {
// Only unbind the store if a new one was passed
if (me.store) {
store = Ext.StoreManager.lookup(store);

// On reconfigure, view refresh must be inline.
originalDeferinitialRefresh = view.deferInitialRefresh;
view.deferInitialRefresh = false;
view.deferInitialRefresh = originalDeferinitialRefresh;
} else {
me.fireEvent('reconfigure', me, store, columns, oldStore, oldColumns);

It looks like it the method goes into reconfigureLockable it never assigns store to the store object.

If I don't hear anything to the contrary I will report this bug, but I will give it a little in case I am missing something here.

31 Jan 2013, 4:27 PM
In which version? I seem to recall having fixed this for the 4.2.x beta.

whirling dervish
31 Jan 2013, 9:08 PM
I am seeing this under ExtJS 4.1.3

Briefly looking at the source of the 4.2 Beta, it looks like it has the same issue.

whirling dervish
7 Feb 2013, 12:16 PM
Created a bug http://www.sencha.com/forum/showthread.php?255930