access mutators from Field input

1.4k Views Asked by At

I have custom mutators to handle Slider value changes in react-final-form, like this example. However, I want to have a function that generates Field/FieldArray in a Wizard, like this example. In FieldArray render function I can access arrayMutators and another custom mutator from fields variable. I couldn't find these mutators in the input variable from Field.

Is there a way to access custom mutators from input or access form.mutator in Wizard from the parent?

1

There are 1 best solutions below

1
On BEST ANSWER

That Slider example is a misuse of mutators. That <SliderField/> could be done with just a <Field/> component.

Edit Wizard-Example

Mutators live on the form. If you really need to get at them, you can use the useForm() hook.