1
我有以下代碼。Sencha touch列表清潔數據
var list = this.getNavigation();
if (list.itemsCount > 0) {
list.removeAll(true, true);
}
list.setData(filtered);
List = xtype:list。 所以想法是接下來我有菜單,有時我需要重建它。因爲你看到我沒有使用商店,因爲我需要過濾數組並設置它。 當我打電話的removeAll我得到錯誤
Uncaught TypeError: Cannot call method 'getScroller' of undefined
,我不能找到方法來清除它...
你在名單後面有商店嗎? –
不,我只是使用setData設置數組 –
爲什麼不過濾商店中的數據? – kio21