beforesemicolon / flatlist-react

A helpful utility component to handle lists in react like a champ
MIT License
95 stars 17 forks source link

Help - Dynamic Filtering #60

Closed samaguilar closed 4 years ago

samaguilar commented 4 years ago

is there a way to dynamically filter items in a FlatList? Say I wanted to filter items based on today's date, tomorrow's date, etc, how could I go about changing/updating the filterBy prop function dynamically?

e.g.

filterBy={item => (item.date > '6-20-20'); // all items past todays date to filterBy={item => (item.date == '6-20-20') // all items happening today