<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.
@vishnudivakar31 Could you provide a working example using this sandbox as requested in the issue template?
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.
Can anyone verify if this has been fixed? We did a "hack" where called the onChange on a setTimeout but would like to remove it.
Is there any update on this issue? Also occurring for me
I was able to reproduce this on:
Windows 10 v1903 (OS Build 18362.476)
Chrome Version 78.0.3904.108 (Official Build) (64-bit)
https://codesandbox.io/s/react-codesandboxer-example-gt8bz~~
We have a profile page, with a select on it.
When a city is selected, a second select has to be shown to select an organization in that city.
When you select a city it never triggers the onChange handler
edit, this was an issue with our wrapper component around the react-select package. This was unrelated to this issue.
@cmmv91 @leojh can you guys explain a bit where you added the setTimeout
I tried adding it in a fork of react-select, but it doesn't fix the issue:
https://github.com/bertyhell/react-select/blob/master/packages/react-select/src/Select.js#L601
@bertyhell I think you have it right. we didn't do a timeout value where you have 10 but that shouldn't matter. this issue is weird bc also it doesnt seem like it breaks for all of our components only some. also, only on certain versions of Windows
is there any update on this issue?
Guys, I need your help.
i used react-select for a select field. a user can select multiple options. i am using formik to validate the form. i am also using the handle change from formik but the onchange event is not firing. my console returns a type error, that says "target is undefined". how do i fix this?
I was able to work around this by turning off portaling :(
Is there any update on this issue. onChange on
I've started a fork of react-select. Feel free to resubmit this issue on the fork and/or submit a PR to resolve this issue on the fork and we can get it merged and released.
EDIT: :tada: I've archived the fork now that we've got some momentum in this repo and Jed is involved again. Sorry for the disturbance!
Greetings,
As suggested by @Rall3n , we are unable to troubleshoot code implementations without providing a code implementation preferably in a codesandbox.
In the interest of focusing on still relevant features and stability, I will be closing this issue. However, this can be reopened if issues are still present for any of you and have code samples for us to better review and investigate.
Most helpful comment
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.