onChange event is not getting fired on react-select.
See original GitHub issue<Select options={this.dropdownData} onChange={this.selectChangeHandler} styles={customStyles} components={{ MenuList: this.itemWrapper, Input: this.trigger }} key={title} closeMenuOnSelect={false} onInputChange={value => this.selectValue = value} placeholder={this.props.placeholder} filterOption={customFilter} isMulti isSearchable />
I am overriding both Input and MenuList components. For MenuList, I am using a virtualized list, but when I am making a selection, the onChange handler is not getting fired.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:13
Top Results From Across the Web
React select onChange is not working
This function is getting triggered only once when the select is loaded and subsequently when I change the value, its not getting triggered....
Read more >Handle the onChange event on a Select element in React
To handle the onChange event on a select element in React, set the `onChange` prop on the select element. Keep the value of...
Read more >Advanced
By explicitly passing you what type of change event has been fired, we allow you to have more granular control over how the...
Read more >React Select Dropdown onChange Event Handler Tutorial
We'll help you learn how to build a select dropdown list. Also how to attach the onChange event handler to the select dropdown...
Read more >HTMLElement: change event - Web APIs | MDN
The change event is fired for <input> , <select> , and <textarea> elements when the user modifies the element's value.
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
I’m having a similar issue, is not that onChange event is not firing but onBlur is firing first, causing onChange never to fire. We currently have a workaround by adding a timeout to onChange. The issue has been reproduced on Win 10 Pro and Home editions, and on Chrome, Firefox and Edge browsers. We haven’t found a pattern on how to reproduce it or why it happens, we will be trying to reproduce it on the sandbox above and share with you upon success. Please let us know if you have any questions regarding this issue.
Is there any update on this issue. onChange on <Select> is working fine on mouse click but not working when press keyboard enter key in Chrome browser.