You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Select component is calling parent props onMenuOpen.
I imagine that's because the expected behaviour is that the menu should be always open
if the user is typing.
However, we could put a condition in the manger, or in the select, if the menu is already open, there's no reason to fire onMenuOpen again.
Reacted by Luis Oliveira, sally-ellevation and hung1998pro
The onMenuOpen callback is triggered within handleInputChange in addition of being triggered already when the Menu actually opens in the openMenu method as is has been mentioned in #3620 as well
Well just removing the call to onMenuOpen inside handleInputChange breaks some tests ... Looks like the lib is relying on this buggy behaviour for a reason I don't have time to investigate ...
Thus it may be a breaking change for many users and may require a major new version...
Reacted by Luca Maroni, Gonzalo Arrivi and twgraham
Activity
ronjouch commentedon Feb 19, 2019
I confirm the bug with react-select@2.4.1 in Chrome 72
Bryze commentedon Feb 20, 2019
Any update on this?
viniciusdacal commentedon Jul 11, 2019
still on 3.0.4.
The
Selectcomponent is calling parent props onMenuOpen.I imagine that's because the expected behaviour is that the menu should be always open
if the user is typing.
However, we could put a condition in the manger, or in the select, if the menu is already open, there's no reason to fire onMenuOpen again.
lorisdev commentedon Jan 7, 2020
Still the same behavior in 3.0.8
The
onMenuOpencallback is triggered withinhandleInputChangein addition of being triggered already when the Menu actually opens in theopenMenumethod as is has been mentioned in #3620 as wellreact-select/packages/react-select/src/Select.js
Line 1092 in 3c7de0d
react-select/packages/react-select/src/Select.js
Line 502 in 3c7de0d
Fixes JedWatson#3335 - remove the call to onMenuOpen within handleInp…
lorisdev commentedon Jan 8, 2020
Well just removing the call to
onMenuOpeninsidehandleInputChangebreaks some tests ... Looks like the lib is relying on this buggy behaviour for a reason I don't have time to investigate ...Thus it may be a breaking change for many users and may require a major new version...
- Fixed performance drain with closeMenuOnScroll when using multiple …
Fixes JedWatson#3335 - remove the call to onMenuOpen within handleInp…
lorisdev commentedon Feb 26, 2020
pruik found that we should call
onMenuOpeninsidehandleInputChange#3897 (comment)The PR now passes all the test 🎉
He proposed another PR as well which fixes this bug. We may see it fixed soon 🤞
bladey commentedon Jun 12, 2020
PR #3335 in review.
Merge pull request #3897 from lorisdev/fix/3335