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
DropdownToggle with children does not close when toggle is clicked #2660
Comments
illiteratewriter
added a commit
to illiteratewriter/reactstrap
that referenced
this issue
Dec 20, 2022
- fix issue where if children of dropdown toggle where not simple strings the dropdown would remain open
Any update on this? |
@illiteratewriter graciously opened a PR with the fix in December, but unfortunately it does not seem to have been reviewed yet 😞 |
illiteratewriter
added a commit
that referenced
this issue
Mar 2, 2023
This was referenced Mar 2, 2023
This was referenced Mar 29, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
DropdownToggle
#9.1.5
es
#18.2.0
,#16.14.0
#5.2.3
What is happening?
Clicking a
<DropdownToggle>
with non-string children on an open Dropdown triggerstoggle()
twice, which prevents the dropdown from closing.What should be happening?
Clicking the dropdown toggle should close the dropdown.
Steps to reproduce issue
https://github.com/FoodProduct/bootstrap-dropdown-component
<DropdownToggle>
whose children are not a simple string (e.g.<div>Click me</div>
)Error message in console
N/A
Code
https://stackblitz.com/edit/reactstrap-vcxbgg?file=Example.js
This is because the document click event handler does not recognize the click event on the toggle properly, causing an extra trigger, i.e. the following check fails:
reactstrap/src/Dropdown.js
Line 101 in 75a4ab3
The text was updated successfully, but these errors were encountered: