Search code examples
javascriptreactjsreact-final-form

Reset input value to initial value on condition in React Final Form


How is it possible to reset values.range to initialValues.range after condition is set to true in https://codesandbox.io/s/xjxx7xp07q ?

May you tell where I am missing the point? Many thanks for all possible help.

UPDATE

Found working example - https://codesandbox.io/s/l706w7yr2q , but have no idea how to refactor component into Wizard form case xD any help appreciated, from where should I start?


Solution

  • Possible solution using Declarative Form Rules

    Working example - https://codesandbox.io/s/zwr2o7xo0m