Unexpected call to onMenuClose on input blur. #3876
Labels
issue/bug-unconfirmed
Issues that describe a bug that hasn't been confirmed by a maintainer yet
issue/reviewed
Issue has recently been reviewed (mid-2020)
There is a call to
onMenuClose
on everyinput
blur, even when the menu has already been closed from another action.Steps to reproduce:
onBlur
andonMenuClose
function to theSelect
component.onMenuClose
is fired)onBlur
andonMenuClose
are fired)CodeSandbox reproducing the issue: https://codesandbox.io/s/admiring-bardeen-pu0rg
I was looking through the codebase and found that
onMenuClose
is being called regardless of the value ofmenuIsOpen
. Link to codeAdding a conditional for
menuIsOpen
should fix the issue I believe. I would be happy to submit a PR if you believe that the approach I am proposing makes sense.The text was updated successfully, but these errors were encountered: