Hi, I was asked in office hours to post these questions here:
Can an embedded retool app allow users to add/edit components in a dashboard and save new dashboards to a file system?
Can I automatically reset the columns in a table component when the data source updates?
E.g. Table A has columns "ID, WellName", Table B has columns "ID, SomethingElse". Depending on who loads in, we want to them their table, which means we'll be showing different columns too.
We use a URL param to decide which table to read from.
The columns in the table do not auto-regenerate
I see a "Regenerate Columns" button in the UI, so triggering that on a successful call to the data source would work
For question 1, unfortunately users cannot edit embedded apps they can only use the finalized and deployed app inside an embedded window.
If they want to edit the app, they will have to get access to the org and edit the app the same as you or i do.
For question 2, me and Paulo did some testing and it doesn't seem to be possible to programmatically reset columns. They will automatically reset when a new resource is used.
For you use case, I think you would need to make multiple rest api queries so the source will change. I understand this is not ideal, as it can be tedious to manually create new resources and queries.
I can make a feature request to add in automatic "regenerate columns" when a new table from the same resource is fetched via a query. As that would be very useful for many cases when users have multiple tables with differing schemas in the same resource.
What event do you want to trigger the data source to change? I was guessing on page load as you want to gram the URL params to control which table to read from but just wanted to confirm!