私は自分のアプリケーションのための単純なtreepanelを使用し、時にはそれが次のエラーでノードを展開し、unexpanding停止しますExtJSの4 treepanelバグ
records[i] is undefined
http://localhost:8080/extjs/ext-all-debug.js
Line 58763
私のコードは非常に簡単です:
var tree_store = Ext.create('Ext.data.TreeStore', {
id: 'tree_store_id',
proxy: {
type: 'ajax',
url: 'tree_data.json?object_id=' + Ext.getCmp('object_id').value
},
root: {
text: 'Парки',
id: 'objectId',
expanded: true,
iconCls: 'tree-cls-root'
}
});
var tree = Ext.create('Ext.tree.Panel', {
id: 'stock_tree_id',
store: tree_store,
autoWidth: true,
height: 600,
autoScroll: true,
renderTo: document.getElementById('stock_tree_div'),
useArrows: true,
border: false,
rootVisible: true,
listeners: {
itemclick: function (view, rec, item, index, eventObj) {
document.getElementById("stock_div").innerHTML = rec.data.text;
}
}
});
を持っています誰もこの問題に直面した?
はい、それは 'leaf'属性を含み、 'expanded'はオプションです。私は – BlackLine
だと思います。つまり、leaf-itemsからすべての展開/展開を削除します。もし役に立たなかったら、あなたのjsonを投稿してください。 – TheHorse
私は拡張属性を全く持っていません。 Jsonはかなり大きいです... – BlackLine