WrathChaos / react-native-dynamic-search-bar

Medium Article: https://freakycoder.com/react-native-library-dynamic-search-bar-c03fea9fae36
MIT License
481 stars 52 forks source link

Need a way to programatically clear search #58

Closed Pustaka-Digital-Media closed 2 years ago

Pustaka-Digital-Media commented 2 years ago

Hi,

So in my app, I made it so that the user's search results get cleared once they click on the search bar again using: onTouchStart={...}, But the problem is that the search text still stays there and the user has to manually remove the text, is there any way that I can programatically clear the search bar text, any help would be appreciated

Thanks

WrathChaos commented 2 years ago

Hello @Pustaka-Digital-Media

I haven't tried but can you try to set a ref for the dynamic search bar and then try to reach inputRef inside the library.

If you cannot, I will make a way ASAP!