final-form / final-form

🏁 Framework agnostic, high performance, subscription-based form state management

Home Page:https://final-form.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reset single field value from inside this field component

rendomnet opened this issue · comments

For example I have this simple field. How can I reset only this field by clicking the button?

<Field name="myField">
  {props => (
    <div>
      <input {...props.input} />
      <button onClick={()=> {
       // Reset function
      }>
    </div>
  )}
</Field>

Already asked on stack-overflow with no response
https://stackoverflow.com/questions/62588224/final-form-reset-single-field