-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dropdown component throws error if used with inNavbar property #2758
Comments
After investigation, i think the issue started from 9.1.3, which we landed on after looking at what the ref is for inNavbar in the dropdown toggle component, more specifically this commit: c23d847. The commit introduces a discrepancy in passing ref/innerRef between components that do not have inNavbar, and components that do, that matches the behavior we're observing. |
+1 |
I can reproduce this even without In my case I'm handling the open/close of the menu externally by triggering the toggle callback. |
Ran into this issue while attempting to upgrade. Curious if the PR that's open is planned to be merged? I was trying to implement a workaround by including a hidden |
Dropdown
#9.1.10
,#9.2.0
es
#18.2.0
#5.1.3
What is happening?
Using Dropdown with the
inNavbar
prop and a custom tag results in the "cannot read properties of null (reading 'contains')" error. Code/steps to reproduce is attached below.Upon investigation the tag component does not receive the
innerRef
property wheninNavbar
is passed, and does receiveinnerRef
otherwise.What should be happening?
No error should be thrown.
Steps to reproduce issue
Set up a dropdown menu like below
Error message in console
The text was updated successfully, but these errors were encountered: