I'm developing a simple app in React Native that consists of a React Navigation page, a FlatList (on that page), and I would like a simple iOS-friendly search bar to search the contents of that list (only the titles of each item). What is the quickest/easiest/most effective way to achieve this?
Thanks, Eric
Depends on where you store your data. If you are using normal state, you can do the following;
this.state.listItems.filter(item => item.title.includes(this.state.searchInput))
.When you update your state for searchInput, your list should update accordingly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With