Using Filters as "OR" instead of "AND"

Hi,

I reckon that Filters use an “AND” logic by default: it goes adding up filters while you click on them, and you need to click twice on a filter to hide the corresponding items.

Just to be perfectly clear, here’s an example: if you click on A, it will only show the items corresponding to A. Then, if you click on B, it will show the items corresponding to A AND B. If you want to display only those corresponding to B, you have to click on A again.

Is it possible to have Filters use an “OR” logic instead?

You’d click on A to show the items corresponding to A, and click on B to have ONLY the items corresponding to B.

I’m sure there’s a trick that I’m missing here to enable this behaviour.

I would appreciate your help on this!
Thanks

Hey @pablo.faust! The simplest way to do this would be using radio buttons instead of checkboxes as radios only allow for one selection per radio button group.

This way the page will initially load all items in the list, unless you set the attribute checked = checked to one of the radios, selecting radio A will only show items with A as a category, and selecting radio B will uncheck Radio A and show only items with B as a category.

I knew that it was something obvious! Thanks Luis!

1 Like