If you can share an app export, that would be helpful!
Bumping this as our app is very old and it's using legacy table. I see the clearChangeset()
works in new table but there is no function for legacy table.
How can I clear in legacy tables?
Context: We have customised delete functionality in the app. So, when we select a row to delete, we want our table to clear it's changeset when it's refreshed. so that we don't accidently delete the row that's marked true again.
I don't see an equivalent option for the legacy table api. You could re-trigger the table query, which would reload the table component and clear the edits
When this will get fixed? Adding .clearChangeset() to all my Save queries and it's super inconvenient.
Hi @pavelgur,
Thanks for checking in! There's a few use cases mentioned here. What is your table data source (variable/temporary state, query, transformer)? What event do you have triggered on the Save Action?
I have noticed the regression too, this used to work, when one clicks on Save the query is run to save the edit, I can see on the database that the edit is persisted, but the Cancel and Save buttons still display. The changesetArray
is still populated. When the edit query is successful, a query to refresh the table is called, but the changesetArray is still there and so are the buttons.
(If it matters, the query to save edits and the query to refresh the table both call APIs)
My table data source is PostgreSQL table.
I save the table using "Bulk update using primary key" via changesetArray.
Thanks!
If you have a Postgres table that triggers a "Bulk update using primary key" and does not re-trigger the get query for the table, the changeSet will not clear unless you create a clearChangeset event or re-trigger the table query to refresh. The request to fix this behavior is still in our backlog I don't have an eta yet, but I'll let the team know a couple of folks have checked in on it
@Zvi Since you mentioned that you do have a refresh query, I'd love to get a closer look. Could you share a screen recording of this behavior in edit mode? or could you share the app JSON?
My mistake, Tess. Upon examination, my refresh was not written properly. I can now confirm that refreshing the table automatically upon success, indeed resets the changeset and the Save/Cancel button disappears, without the need to add the clearChangeset
to the success event handler.
Ah glad to hear! Thanks for following up