Sencha treepanel의 모든 row 가져오기

2024. 12. 21. 22:39Javascript/Sencha

getRootNode() 사용

var tree = Ext.getCmp('treePanelId'); // Replace with your TreePanel ID
var store = tree.getStore();
var allNodes = [];

store.getRootNode().cascadeBy(function(node) {
    allNodes.push(node);
});

// Output all nodes
console.log(allNodes);