Are inline filters for a select column supposed to update dynamically?

As the title suggests, I have a table with inline filters. I have a select type column with filter values OptionA, OptionB
My dataset now contains an Option C, but the next time the data loads in that value hasn’t appeared in the dropdown list for the filter.

Is it possible to get the options to update when new unique values appear? I know I could do that easily with a separate filter component but I really like the tidiness of the inline filters.

Hi @EdG,

The available options come from the Options setting of the column:

I think the best would be to have a state variable holding the options…

… and setting that for the options:

image

Now, always when there’s new data, update that state variable with the unique values. For example, a simple one liner:

{{state.options}} = [...new Set({{ui.table.value.map(d => d.role)}})];

and checking Reactive Trigger

2 Likes

Perfect! Thanks for taking the time to help :slight_smile:

2 Likes