Reset isDefaultValue
Hi!
Is there a way to say that the current form state is the new DefaultValue? I need it because when I submit a form I want it to reset.
5 Replies
flat-fuchsia•3mo ago
you can pass values to the reset method
those will be used as the new defaultValues
eastern-cyan•3mo ago
reset(values?, opts?): void
Resets the form state to the default values. If values are provided, the form will be reset to those values instead and the default values will be updated.
https://tanstack.com/form/latest/docs/reference/classes/formapi#reset
continuing-cyanOP•3mo ago
Ah great, thank you.
extended-salmon•3mo ago
are you living in react land, or the others ones?
flat-fuchsia•3mo ago
vue if I remember correctly