Skip to content
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

SEARCH - display only nodes matching the search query (hide others) #245

Open
szilderus opened this issue Feb 1, 2018 · 7 comments
Open

Comments

@szilderus
Copy link

I'm using SEARCH -> nodes are highlighted - Is there a possibility to hide all other leaves?
When I have very large tree and I'm searching if particular node - all others that do not match the search query are obscuring the view. (imagine that I have tens or hundreds nodes that do not fit into one screen - it is not easy to identify parents)

Thank you

@lifejuggler
Copy link
Collaborator

@szilderus you can kind of get around this issue by utilizing searchFinishCallback and storing the filtered values in a separate state from the treeData and replace treeData with the filteredDate if there is filtered values

@wuweiweiwu
Copy link
Member

@szilderus @fritz-c Ill work on this over the weekend :)

wuweiweiwu added a commit that referenced this issue Mar 4, 2018
expandOnlySearchedNodes props is used so the tree only expands search matches and collapses all other nodes. #245.
@wuweiweiwu
Copy link
Member

@szilderus @lifejuggler added in #256!

@szilderus
Copy link
Author

Thanks for adding this but what I've ment is something little bit different - imagine for example that you have 'needle' in the list of 1000 'hay' elements that are ON THE SAME LEVEL - you need to scroll 1000 elements to view the 'needle'. Is it possible to HIDE all 'hay' elements? And leave on the tree only 'needles'. Display only branches that contains 'needle'.

Regards!

@orlowang
Copy link

orlowang commented Jun 21, 2018

yeah, hide-no-matching-node not close-no-matching-node, this is really useful for tree search with large nodes, I have more than 8000 nodes in my project

@fritz-c fritz-c reopened this Jun 22, 2018
@subeax
Copy link

subeax commented Oct 11, 2018

Hi Guys! Do you have any plans/updates on this feature? It's pretty useful.

@piotrkochan
Copy link

Any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants