Filter a collection with Buttons

On my App, I have a page showing a collection with a list of all items.

What I would like is to have 3 buttons on top which will FILTER my collection based on which button you press.

So it is showing all by default. Pressing button 1 will filter out only items that are in category 1. Pressing button 2 … Etc

I tried it with a button block on top… But I don’ tseem to get the settings right.
I tried with an action, when adding this action to the block, then the block disapears?

All options are welcome.

There are 3 paths for you to go with, I believe:

  • Add a user-specific column, and have your buttons write to that column. Filter the collection by the user-specific value.

  • Still add a user-specific column, but have a single choice component that has 3 options, and filter the collection using the user-specific value.

  • Use the built-in filter, which I think you probably don’t want since you went the button way.


Thanks dor your answer. But it’s more like a selector. like show all GREEN / RED / BLUE items. Would the above then be the best option ?

What do you mean by selector? You can select with a choice component, and that’s possibly the easiest way to go to not handle too many components on the front-end for chosen option’s visibility.

1 Like