Do a complex "search for" in a reusable element

I am creating a list of cards with Mentors (my database).

In particular, I want to create multiple filters. In the image you can see 4 different filters (Background, Carreira Actual, etc).

When you click in the filter, it opens a small popup with all the unique values that exist in the Mentors database in a specific field/column. For example, in the Background column in the Mentors database there is only Civil Engineering and Marketing (as you can see in the image above).

I am going to use this element (the list of cards with the respective filters) for many different databases and I want to create a reusable element for the filters and, in a perfect scenario, for the entire element (list + filters).

Now the major issue I am facing is the following:

  • I am trying to use a reusable element for each “filter button” but I am not able to pass inside the “filter button” the field it should use dynamically. I’ve tried many different approaches but I can’t make a “Search for in Mentors: each item’s ” to get all the options of the field. Any idea on how can I do it? And how can I pass this “name of the field dynamically” to the reusable element?

Thank you :raised_hands:

This topic was automatically closed after 70 days. New replies are no longer allowed.