FormSelect onChange
See original GitHub issueIn the FormSelect, when invoking the handleChange event, its passing the e.target.value
instead of the event itself.
handleChange: function handleChange(e) {
this._lastChangeValue = e.target.value;
if (this.props.onChange) this.props.onChange(e.target.value);
}
Wouldn’t it better to just pass the entire event?
handleChange: function handleChange(e) {
this._lastChangeValue = e.target.value;
if (this.props.onChange) this.props.onChange(e);
}
Thanks.
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Javascript onChange for Form Select Field - Stack Overflow
First: "onChange" -> "onchange". Next, wrap the alert function in a wrapper, otherwise ...
Read more >react-hook-form-select-onchange - CodeSandbox
CodeSandbox is an online editor tailored for web applications.
Read more >onchange Event - W3Schools
The onchange event occurs when the value of an element has been changed. For radiobuttons and checkboxes, the onchange event occurs when the...
Read more >Javascript onchange Event Tutorial to Get Dropdown Value of ...
Javascript onchange Event Tutorial to Get Dropdown Value of ... Javascript Form Select Change Options Tutorial Dynamic List Elements HTML5.
Read more >FormSelect | Documentation - frontile.dev
Arg Type Required
options any | PromiseProxy Yes
selected any Yes
beforeOptionsComponent string ‑
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@IvanJov agreed, this will break any app using the
FormSelect
component.@JedWatson @mxstbr Would need a major version bump – might be a good opportunity to make some other breaking changes.
I ran into the same issue, would be better imo