control the search field
Hi,
I want to know if it is possible to control the search field or have a onInputChange callback?
Thanks.
So I handled this by passing a custom searchPredicate that saves the search term in a ref. It's wasteful because that predicate runs on every node, but it at least works.
The part that I do not believe there is an API for is controlling the search field. I previously requested a way to provide an initial input for the search field, and a built-in way to view the current search term, and was told that would be an enhancement.
Hi,
Thanks for you reply. Finally I used the same trick as you but it is not ideal as the search term return nothing if there is no more items in the filtered options.
The other thing is that it is mandatory that you put options to have a a non null searchTerm. It is annoying as I wanted to fetch the options async.
Yeah, I have also noticed this doesn't work if clearSearchOnChange is selected.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.
I have a PR for this, keep open
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.