What does "Reset after successful save" property of Table actually do?

If you could help me understand this property. It was added in April with this description (but docs are not updated):

  • Added a new option to the Table component "Reset after successful save" that allows you to control whether the Table data should reset after saving or adding new rows

I assume this means that the table will not be repainted after an update resulting in a bit better performance.

But when I disable the property and update a record, the table refreshes anyway. I am of course running the select query to refresh the underlying data source and the table Reacts to the change and refreshes.

Sooo..., what am I missing or misunderstanding?


Hey @bradlymathews!

That toggle has the following effect:

On - When saving changes, revert the table back to display current values. Changes are reflected when table data is refreshed.

Off - Saved changes remain visible in the table but won't reflect current values until table data is refreshed.

Before introducing this toggle tables would default to the On functionality meaning that if the underlying table query took a while to fetch you'd see odd behavior where the old values would show for a bit before updating.

Ah, got it. Had that old value flash happen a fair bit and was commented on by users.

Seems like the Off should be the new default, can you give a use case where you would actually want it on?

I'm not sure :grimacing: the toggle was implemented specifically to fix that behavior but I'll check to see if there is a particular reason to keep "On" - it may be that it should be changed!

Is there a reason why I don't see this "Reset after successful save" toggle component on my table?

Hey @cbrockway!

In the new inspector UI for table the setting can be found under the advanced settings of the Interaction panel - let me know if that helps!

Thanks for the great and quick feedback! Working perfectly now.