Hey everyone, I'm having trouble figuring out how to dynamically show/hide columns in the new table component.
The multiselect dropdown automatically populates with a list of column titles from the data source. When the user selects one of the options, it should hide the corresponding column in the table below.
Is there a way to do this dynamically with the new version of the tables? The new tables seem to be missing the column visibility properties available in the legacy version.
You can do it by individually setting Hidden values within the columns.
Though to make it truly dynamic it seems it's missing a feature to reference the column itself so you don't have to manually write the id of the column.
Exposing access to the column ID in the code is an interesting use case that the team is considering -- we are looking into adding support for more dynamic column configurations, but for now hardcoding the logic in the Hidden field is the way to go!
Thanks @stefancvrkotic and @mckenna! I was hoping to avoid hardcoding the values, but it seems like that's the only option. Appreciate the responses!