Thank you, that was really helpful! One quastion: do you know how to make the search accept two seach parameters? like i want to search base on the name and also the address?
I think it'd be const results = !searchTerm && !searchTerm2 instead of || otherwise the filtering will be applied only of both search terms are present.
i came up with this solution and it works now but only if one of the conditions is true. I want to make the method filter the two conditions in the same time. So like i want to know all the people that their name is Alex and lives in New york
Thank you, that was really helpful! One quastion: do you know how to make the search accept two seach parameters? like i want to search base on the name and also the address?
This what i tried, and failed :(
I think it'd be
const results = !searchTerm && !searchTerm2
instead of||
otherwise the filtering will be applied only of both search terms are present.i came up with this solution and it works now but only if one of the conditions is true. I want to make the method filter the two conditions in the same time. So like i want to know all the people that their name is Alex and lives in New york
For your specific case you can do like this:
However, note that the filter won't be applied unless both search terms are present.
Yah but that is exactly what i don't want. I want that the user can choose one of the filters or both of them in the sametime
Hello! In the end you found the solution?