Thank you, Scott. So, here is what I figured out.
- I created state variable columnsToShow
- In my JS Query, I setValue the columnsToShow state variables to an array of the columns that I want to show
- In the hidden property of each column, I inserted this snippet:
{{ !columnsToShow.value.includes( `uniqueID` ) }}
Shortcomings to this approach:
- I must enter the column names as strings in the snippet above because column names are not accessible (AFAICT) in the new Table component
- The state variable array also is hard-coded for each different query I will run
- To fill the Table component with all the column names I might need, I need to run each query while editing the App and then add the snipped above to the Hidden property of each column
To answer your questions:
- I want to use only one table component for all queries to reduce the number of table components in the App which could grow quite large
- I found this post, which helped me come up with my variation
At this point, I think the problem simply is that the new Table component does not expose columns for any purpose (naming, hiding, resizing, etc.), and I can find no way to dynamically erase the existing columns in a table and reset them based on the columns returned by a SQL query.