final-form / final-form/react-final-form

form.reset() causes additional unpredictable effects and errors (bug report)

Open
#414 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.4k
Forks
497
PR merge metrics
No merged PRs in 30d

Description

### **bug report**

### What is the current behavior?
form.reset() causes additional unpredictable effects and errors (bug report)

### What's your environment?
Windows-7 Chrome-66 react-final-from@4.0.2 final-from@4.11.0 final-from-focus@1.1.0

### Fixed by preventDefault()

Hear the code of reset button with preventDefault function:
{
form.reset(e);
e.preventDefault();
}}
disabled={pristine || submitting}>
{'Reset'}

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.