Closed appetiteOlzh closed 1 year ago
You can use setForm:
const form = createForm({})
sample({ clock: someEvent, target: form.setForm })
setForm
won't reset initial values and dirty state.
Initial value is static at the moment and can't be changed.
https://github.com/42-px/effector-forms/blob/master/src/field.ts#L30-L32 https://github.com/42-px/effector-forms/blob/master/src/field.ts#L51
@appetiteOlzh @tplk
I added the setInitialForm method that overrides the initial values. That way the isDirty flag becomes false
Please, use v.1.1.0
Need an event to reinitialize the form. To overwrite the initialValues after receiving them from the back. And set them on form.reset.