lukasbach / react-complex-tree

Unopinionated Accessible Tree Component with Multi-Select and Drag-And-Drop
https://rct.lukasbach.com
MIT License
915 stars 72 forks source link

Custom search #304

Closed safadl closed 5 months ago

safadl commented 7 months ago

Hello,

Is there a way to search the tree from a custom search input? I am aware that there is already a feature to search the tree once we start typing but I want to display the search input at all times.

lukasbach commented 7 months ago

You can customize the render logic for the search input, but not that it should always be visible at the moment. But you can use the expandSubsequently method on the tree reference to find a specific item and use custom search logic, there is some documentation available here: https://rct.lukasbach.com/docs/guides/search/#finding-items-that-are-not-loaded-in (last section)