Discuss anything related to web development but no technical support questions
Re: Scheduler- Tree filter stops working after Left panel re
Unread postby mats » Thu Aug 28, 2014 9:47 am
Sorry, cannot reproduce. Please provide exact instructions as a step by step.
Mats i have 2 scnerios
1) Using
resourceStore.setRootNode({ Id : 1, Name : 'test', children : [{...}]})
Go to
https://jsfiddle.net/Lry46114/35/
Click on Reload button (new data with 2 appended in node name should display). It's not working
2)
var root = resourceStore.tree.root;
root.removeAll();
resourceStore.clearData();
root.appendChild(getResourceList(2));
Go to
https://jsfiddle.net/Lry46114/37/
Click on Reload, it reloads new data but once you expand/collapse it returns duplicates
As per your last reply i should not use private property/methods. So i preferred approach 1 but not able to see new data in left panel
shaveta wrote:
1) Using
resourceStore.setRootNode({ Id : 1, Name : 'test', children : [{...}]})
Go to
https://jsfiddle.net/Lry46114/35/
Click on Reload button (new data with 2 appended in node name should display). It's not working
Array isn't a valud argument for 'setRootNode' method. Read the docs
https://docs.sencha.com/extjs/4.2.2/#!/a ... etRootNode
shaveta wrote:
2)
var root = resourceStore.tree.root;
root.removeAll();
resourceStore.clearData();
root.appendChild(getResourceList(2));
Go to
https://jsfiddle.net/Lry46114/37/
Click on Reload, it reloads new data but once you expand/collapse it returns duplicates
As per your last reply i should not use private property/methods. So i preferred approach 1 but not able to see new data in left panel
In this case you manipulation with data is incorrect. Change you 'Reload' handler to this:
var root = resourceStore.getRootNode();
root.removeAll();
root.appendChild(getResourceList(2)[0].children);
flightStore.loadData(arrData);
Root is node with id 0. getResourceList will return node with id 0 which is incorrect. If you want tree to operate normally you should keep id's unique.
Read docs about trees carefully.
Ok Thanks!!
Let me try solutions you suggested above