I have a data set like that:
product_id | subfamily | family |
---|---|---|
001 | alpha | A |
002 | beta | A |
034 | gamma | B |
078 | gamma | B |
098 | beta | A |
021 | epsilon | B |
where each row is a product and products are classified in their subfamilies and families. There are just two families, A and B. A has specific subfamilies which cannot be in family B and viceversa. The same happens with the products, the products in one subfamily cannot be in other subfamilies.
The thing is, I wanna have more than one filter, so for example if in the first filter I choose family A and I add a second filter based on subfamily, the options in subfamily will just be "alpha" and "beta", gamma and epsilon shouldn't appear because I would have already filtered by family A.
Is this possible? Right now I can add multiple filters but all the options appear so the user can filter in criteria which are not compatible (for example selecting family A and then selecting subfamily gamma, this shouldn't be possible).
Thanks!