How to filter repeating group by somehting else than input? (airbnb)

Hello everyone

for the moment I have a repeating group which I can filter by a multidropdown. What if I want to filter it by clicking on image or other things like this ?
As we see it on airbnb on the top, we can filter by clicking on “forest, sea, tiny houses…”

many thanks

You should store categories or keywords for each listing. You could use a plugin or api to generate keywords from a photo of the listing, or it could be done manually.

1 Like

As @nfisher said, there should definitely be a list of categories for each item. Then, you can set a custom state (selected category) to the main repeating group that shows items. The data source of this item will be filtered by the custom state. Whenever you click on the category, it will update the current category of the main repeating group.

See a demo below:
chrome_5SZ3649O6J

Here is a sample data for these to work. This is the option set but it can be a regular data as well, it doesn’t matter really.
image

And here is the items that can have the listing names and stuff. See how the item has a list of categories.
image

Then, the upper repeating group might display all categories in a nice way:

When a category is clicked in this repeating group, you can update a custom state of the lower repeating group:

Then, the lower repeating group might display and filter based on the selected category custom state:

1 Like

it works! many thanks
but what if I want to display all catégorie on page load?

many thanks!

finally i set a custom state “all” and all products have this category and their precise one. Set the default custom state of product rep group to "all’ and it works.
Many thanks guys!