PDA

View Full Version : [FIXED] Modern - Ext.dataview.List assumes store is set in onContainerResize



FBNitro
25 Aug 2015, 2:10 PM
In Ext.dataview.list of the Modern FW. there's a defect in onContainerResize. The code is currently assuming the store is set. If the store hasn't been set yet, this code bails. It should do a check for store before the !store.getCount(). There are other locations in this code that do similar checks.



onContainerResize: function(container, size) {
var me = this,
store = me.getStore(),
currentVisibleCount, newVisibleCount, minHeight, listItems, itemMap, itemConfig;
if (!me.headerHeight) {
me.headerHeight = parseInt(me.pinnedHeader.renderElement.getHeight(), 10);
}
if (me.getInfinite()) {
itemMap = me.getItemMap();
minHeight = itemMap.getMinimumHeight();
if (!store.getCount() && !store.isLoaded()) {
// If the store is not yet loaded we can't measure the height of the first item
// to determine minHeight
// TODO: refactor
me._fireResizeOnNextLoad = true;
return;
}

evant
25 Aug 2015, 3:36 PM
The current code has a store check.

FBNitro
25 Aug 2015, 3:38 PM
Awesome, thanks for responding.