EE / angular-ui-tree-filter

A module providing an AngularJS filter which can be used with angular-ui-tree to match tree nodes.
ee.github.io/angular-ui-tree-filter
MIT License
40 stars 21 forks source link

Show all child nodes for a matching parent #10

Open Nimish0410 opened 8 years ago

Nimish0410 commented 8 years ago

If Parent Matches but no child matches,then the filter should return all the child elements,whereas if children matches then the filter should return the parent and the matching children.

jrencz commented 8 years ago

If Parent Matches but no child matches,then the filter should return all the child elements

That's clearly not what. But it makes sense to display them. It just needs a clarification about if we need to display all children or just 1 (or configurable number of) levels below matched node.

whereas if children matches then the filter should return the parent and the matching children.

This actually happens now. It's not possible to be observed in the demo because the fixture is so small. If any node matches the filter preserves the whole path to that node. It won't preserve its siblings that don't match on their own.

If you feel you can implement this feature please file a pull request and I'll be happy to review your code and help you contribute.