-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filter in tree in controller #144
Comments
Could you please set up a Plunker? I don't understand what's actually your problem ;-) But to answer your question: yes, you can filter via controller, you only need to fill the filter string into the scope variable |
Here is the plunker https://plnkr.co/edit/wXFDsJyWIYvqh7tCqats?p=preview I add an event to the directive to pass the The modifications I made are in |
Ah, now I think I got what you trying to do... I think you made it a little bit to "complicated". I created - based on your plunker - another one: https://plnkr.co/edit/mSkYNjm6NpuOQoWxOYMA?p=preview What did I change?
Now the click on the search button sets the content of the scope variable |
Oh, I didn't think in that solution for search. But this is what I want to achieve I want to expand the child of a filtered node. For example, if you search for I think the problem was this line in the original template:
It is constantly filtering the tree. That was the reason I want to do the filter in the controller, that way I could expand the node after I filter them |
Please take a look at #138 Otherwise the filter logic in the |
Is currently a way to filter in controller?
I am doing it this way for the moment:
The problem I have with this solution is if I expand or collapse a filtered object it expands all nodes from original tree. It should expand filtered nodes
The weird is ng-click only do this
This was my original template
But with this solution I can't expand or collapse nodes because it is filtering all the time
If there is a way to do it I will appreciate any hint
The text was updated successfully, but these errors were encountered: