JedWatson / react-select

The Select Component for React.js
https://react-select.com/
MIT License
27.63k stars 4.13k forks source link

onBlur doesn't trigger when clicking on clear indicator of another select #5664

Open EliteUser opened 1 year ago

EliteUser commented 1 year ago

Hello!

I have Select with isClearable prop, and I have following logic - when I clear value in this select, the second Select should disable. So I set isDisabled to true in 2nd, when I clear value in 1st select.

Faced the following problem: when I focus 2nd Select, and then click on cross icon - onBlur event doesn't trigger. My select have styles depending on focused state, so without onBlur my select is always remain focused

select_blur

But it doesn't reproduce with simple button - when I focus 2nd Select and then disable it with button - onBlur fires.

I expect onBlur to be fired in both cases

I created reproduction