TreePanel Nodes with filtered Children

37 views Asked by At

I have a TreePanel. When I filter the store of the TreePanel so that a node appears to be empty, the symbol to open the node is still there. I think it would be better if the symbol to open the folder disappeared if its content is not visible. Is there a solution for this?

https://fiddle.sencha.com/#view/editor&fiddle/2438

2

There are 2 answers

0
Brian Mogambi On BEST ANSWER

You can set "expandable: false" on the filtered and empty nodes (children:[]) and do the same thing when inserting new code.

0
Alexander On

The icon is rendered if the node's isExpandable function returns true. You can override that function to your needs.

Or maybe you want to override the hasChildNodes function to include a check whether the child nodes are filtered out or not.