#Should form.reset() be clearing changed input fields?

6 messages · Page 1 of 1 (latest)

shadow mica
#

form.reset updates values to given initialValues. If you want other behavior then you can call form.setValues instead.

woven merlin
#

Well then yes I believe it isn't working as i've intended, as the initial values differs from the values in the inputs.

#

Ahh, it seems it is setting the form values to the initial values, but the inputs are not updating.

#

Is there something i need to do to make the inputs update?

#

Update: It seems it's only the TextArea that is keeping the previous value, the Inputs/Selects are all working as intended, I took the extra step and invoked useForceUpdate() when calling reset as well. So it seems to be just a TextArea Issue for me

young obsidian
#

Can i reset specific nested fields? like form.reset('users.0')?