CMSFilter - if user selects a filter, show items that match that filter OR items where the category field is empty

I have a CMS collection of documents, each document has a (single) category reference, which can also be empty.

When the user selects a category of document to filter by, I want to show all documents tagged with that category, and also all documents where the category field is empty.

is this possible?

@Support-Luis any ideas on how to solve this? thanks!

Hey @jaime, CMS Filter requires a text match to return a match.

You could have an element with conditional visibility that only shows where this reference field is selected. As long as the text inside this elements matches the text on the filter field all should be okay!

Heya @Support-Luis ,

Thanks for that.

What I tried is to create an ‘All’ category, and then added some JS so that when any of the other category items are checked, the ‘All’ checkbox is also manually checked. But the finsweet CMS filter solution does not appear to honor any checkboxes that are manually set to checked via JS. It only filters items based on the filters checkboxes that are actually clicked by the user.

Is there any way around this?

Hey @jaime! Can you share a link so I can take a look?