Components > Data > Filter | Use dropdown to filter values, is possible?

I've seen that the Data Filter component in Retool allows me to create logical combinations for searching records, similar to Airtable. However, in Airtable, if a field has a list of options (e.g., a dropdown), the filter lets me preselect values from that list for searching, and even allows selecting multiple options.

In Retool, the Data Filter component doesn't seem to provide the same functionality for preselecting options or multi-selection in a field when filtering records.

Is it possible to configure the Data Filter to support multi-select dropdowns or pre-defined values when filtering? If so, how can this be done?

1 Like

Hi Matteo. I'm not sure if there is a built in way to do that. But some things you could do are

  1. Use filter with some Or blocks like this:

  2. (slightly more advanced skills required) Or build a separate multi-select. It could get all values from the data like (Spanish, Dutch, English). and then when options are selected it could perform some filtering on the data.

Neither of those are perfect but hopefully helpful.

1 Like

Thank you very much for the response!

I’m trying to find a way to not input the search value manually as a string, but to select it from a list of options. Unfortunately, it seems like this functionality isn't possible in Retool at the moment.
What a pity :frowning:

Glad to help. With option two above, you could do it with a multiselect and you wouldn't have to enter anything by hand. The options given to the multiselect would be something like {{artists.values.map(artist => artist.nationality)}}. But you would have to build it yourself. There doesn't seem to be a pre built way to do it. Not sure if that's helpful.

1 Like

I’d piggyback here to say a multi select with a change event handler setting a filter makes sense to me. It would be outside the table toolbar, so not sure if that’s a deal breaker for you. I tend to set up filters and drop downs outside of tables anyway as I can often make them a bit more user friendly (or at least direct users to use them how I want them to be used…)