TanStackT
TanStack3y ago
10 replies
progressive-amaranth

Question about select option

Hello,
I struggle to use react query select option for a specific use case

I have a list of data which cames from a fetch. Then I have radio buttons which have the role to include or exclude a part of the data.

For exemple on radio button will include some data. Then another radio button will exclude them.

I manage to filter the data by using the select option.
The problem is that I need the latest filtered data array to accumulate the radio button filter.

When I apply one filter, It filters good. But as soon as I apply a second one, the second filter Is based on the data from the cache and no the latest.

My need : applying accumulatives filters. When data A is filtered. B will filter on A. When data B IS filtered, C will filter on B etc.
Was this page helpful?