google / google/material-design-lite
Form reset should reset text fields to initial state
- Dominant language
- HTML
- Stars
- 32.2k
- Forks
- 4.9k
- PR merge metrics
- No merged PRs in 30d
Description
Calling [.reset()](https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/reset) on a form element, or using a reset button should reset text fields to initial state.
[Codepen](http://codepen.io/Halvardos/pen/QEKVJg)
At the moment the text field remains dirty (and invalid even if not required) after a reset requiring the developer to add a call to `MaterialTextfield.checkDirty();` but this does not remove invalid state, so we have to manually call `MaterialTextfield.change();` to both remove dirty and invalid state.
I see there are some issues that have been opened earlier about this but they have been closed without solving this issue. IMO this is not working as one would expect and should be remedied.
Contributor guide
Assessment
This issue has not been assessed yet.