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
extended-salmon•6mo ago
you can pass values to the reset method
those will be used as the new defaultValues
itchy-amethyst•6mo 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#resetrival-blackOP•6mo ago
Ah great, thank you.
continuing-cyan•6mo ago
are you living in react land, or the others ones?
extended-salmon•6mo ago
vue if I remember correctly