Skip to content

Cancel Original Data State (oldData) Update From Built-In Save Action #125

@TimTraylor

Description

@TimTraylor

Hi Luca & team,

Nice work on all of this!

I'm wondering if there is a way to stop the automatic updating of the oldData to the formData from the built-in 'Save' action. As an example, I'm passing in a form-level validation function along with the schema, and I execute this additional function before saving to the back-end. If that validation fails I'll exit the function (defined on the Save button) without saving, the idea being that they need to continue to edit the form.

While I can force the form back into edit mode, at that point it has already made the 'oldData' equal to the 'formData', so if you click 'Cancel' after that it doesn't change it back to the original.

Is there any way to cancel the default behavior and keep them in edit without having the oldData get updated?

Thanks!
Tim

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions