Threaded View
-
7 Feb 2013 12:14 PM #1
[4.1.3] Lockable grid giving a string instead of a Ext.data.Store on reconfigure
[4.1.3] Lockable grid giving a string instead of a Ext.data.Store on reconfigure
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 it isn't obeying the documented event signature.
This is the definition of reconfigure in Ext.panel.Table,
It looks like when the method goes into reconfigureLockable it never assigns store to the store object. and thus fireEvent will fire with a String in the store variable.Code:reconfigure: function(store, columns) { var me = this, view = me.getView(), originalDeferinitialRefresh, 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 { Ext.suspendLayouts(); if (columns) { // new columns, delete scroll pos delete me.scrollLeftPos; headerCt.removeAll(); headerCt.add(columns); } if (store) { // Only unbind the store if a new one was passed if (me.store) { me.unbindStore(); } store = Ext.StoreManager.lookup(store); // On reconfigure, view refresh must be inline. originalDeferinitialRefresh = view.deferInitialRefresh; view.deferInitialRefresh = false; me.bindStore(store); view.deferInitialRefresh = originalDeferinitialRefresh; } else { me.getView().refresh(); } headerCt.setSortState(); Ext.resumeLayouts(true); } me.fireEvent('reconfigure', me, store, columns, oldStore, oldColumns); }
Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.


Reply With Quote