When a select (or creatable) is open, writing triggers onMenuOpen callback on each keystroke.
Demo: https://codesandbox.io/s/k0l8r2z6yr
I think that it should only trigger when opening the menu, right?
When a select (or creatable) is open, writing triggers onMenuOpen callback on each keystroke.
Demo: https://codesandbox.io/s/k0l8r2z6yr
I think that it should only trigger when opening the menu, right?
I confirm the bug with [email protected] in Chrome 72
Any update on this?
still on 3.0.4.
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.
Still the same behavior in 3.0.8
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 https://github.com/JedWatson/react-select/issues/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...
pruik found that we should call onMenuOpen inside handleInputChange https://github.com/JedWatson/react-select/pull/3897#issuecomment-590781548
The PR now passes all the test 馃帀
He proposed another PR as well which fixes this bug. We may see it fixed soon 馃
PR #3335 in review.
Most helpful comment
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.