react-native-searchbar
react-native-searchbar copied to clipboard
added "setResults()" function to show results below the search bar
Hi I wanted to show the search results on top of everything in my app, I thought it is a good idea to add a function to the SearchBar to show the results.
So here it is. usage:
const results = <View> <Text> This is a test </Text></View>
this.searchBar.setResults(results)
I wanted to send the results as an array instead of whole component, But that was OK for me. You can do it yourself, If you want to.
Best wishes, and thank you for this great library
for a scrollable results, you should set the resultsHeight in props
It is good for my app, I have to focus on my job for now. You got the idea, If you want you can enhance this PR.
Thank you.