0
任何人都知道如何刷新嵌套列表?嵌套列表刷新
我正在創建一個列表。點擊一個項目時,它會加載一個嵌套列表。如果我在一個嵌套列表中遍歷,然後點擊另一個項目並返回到prev項目,它仍然卡在最後剩下的地方。
我嘗試使用
Ext.getCmp('nestedList').refresh();
但泰德沒有按似乎工作。
下面是我的嵌套列表面板的代碼。
Ext.define("InfoImage.view.nestedList", {
extend:'Ext.NestedList',
xtype:'nestedList',
id:'nestedList',
config:{
fullscreen:'true',
title:'Work Items Task 1',
// ui:'normal',
xtype:'nestedList',
displayField : 'text',
store:'nestedListStore',
style: {
'background-color': 'rgba(0,140,153,0.1)'
}
}
});
以及加載嵌套列表的代碼是:
showListDetail : function(view, index, item, record) {
var rec = view.getStore().getAt(index);
// Ext.getStore('workItemStore').add({Task: '7'
// },{Server: 'mobcomp1'});
if (index == 0) {
this.getDocPanel().animateActiveItem(
this.getNestedPanel(), {
type : 'slide',
direction : 'up',
duration : 250
});
Ext.getCmp('nestedList').reload();
}
任何幫助表示讚賞。
在此先感謝。
「store」你是指我的nestedlistStore名稱還是「store」本身。在加載嵌套列表之前,我嘗試了我的控制器中的代碼,但它似乎工作。 – Khush
我的意思是,nestedListStore ..這樣的東西..'Ext.getCmp('nestedListId')。getStore()。load();'.. –
它工作。非常感謝。 – Khush