Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ResetForm not clear value of Textarea #41

Closed
vutran47 opened this issue Feb 26, 2017 · 2 comments
Closed

ResetForm not clear value of Textarea #41

vutran47 opened this issue Feb 26, 2017 · 2 comments

Comments

@vutran47
Copy link

I found a bug in the resetForm() method that does not reset Textarea value, apparently due to a missing empty string in the component getValue() method

  return _react2.default.createElement('textarea', _extends({}, rest, {
        value: getValue(), // should an empty string go here to for the method to work?
        onChange: (0, _util.buildHandler)(onChange, function (e) {
          return setValue(e.target.value, noTouch);
        }),
        onBlur: (0, _util.buildHandler)(onBlur, function () {
          return setTouched();
        })
      }));
@tannerlinsley
Copy link
Collaborator

Looks like a bug. Want to test that fix and submit a PR?

DjLeChuck added a commit to DjLeChuck/react-form that referenced this issue May 9, 2017
- Use an empty string as for text
- Fix TanStack#41
@DjLeChuck
Copy link
Contributor

The fix works. I use it in my project. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants