Hidden Column Filter Bug

I have a table that has a dialog for showing and hiding columns. All of the columns are filterable. If I turn on a filter for a column, it works as expected only showing results that match the filter:

Then if I hide the column using my dialog, no results show up:

image

What’s the best way to handle this? Is it possible to programmatically disable a column filter? Or does this need to be fixed container-side? I would assume that a hidden column should not be able to apply a filter.

The current rvm implementation does not support programmatically enabling/disabling a filter from the xml. The filter attribute of a column appears to only evaluate on init. The following does not currently work in 4.83.2.

   <object-table label="test" query="data" empty-message="Your items will appear here">
        <column filter="$: view.enable_filters" hide-if="$: !view.show_column" heading="Number">{num}</column>
        <column filter="true" heading="Integer">{integer}</column>
        <column filter="true" heading="Date" display="{date}" />
    </object-table>

However, it is possible to control this behaviour with a controlled object-table.

See this post which leads to a comprehensive template app using controlled object tables.

A controlled object table has the ability to provide many performance and customisability benefits, however implementing filtering is not always a trivial affair. I have opened an issue for this bug. Feel free to submit a support ticket so that you can keep track of it’s progress

Thanks for creating a bug report. Probably not worth it in our case to go the controlled object-table route but a good option to keep in mind. For the time being I will make sure users are aware that they should not hide a column after filtering on it.