react-overlays
react-overlays copied to clipboard
When manually controlling show, menu is undefined and an error is thrown
Line 204 in Dropdown.js in tag 1.2.0 is (key === ' ' || (key !== 'Escape' && this.menu.contains(target)))
But when manually controlling show
, sometimes the menu is not defined and an error is thrown on key down. I'm trying not to show the menu when there is no value in the input, ie when the input is just focused.
Can the line in this release be changed to (key === ' ' || (key !== 'Escape' && this.menu && this.menu.contains(target)))
?
I managed to bump to this as well while using react-bootstrap dropdown. I use input field as my custom toggle element, code executes line 204 and breaks.
As a workaround I'm just going to hide the component using display: hidden
style for the dropdown menu