-
-
Notifications
You must be signed in to change notification settings - Fork 415
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
fix(dropdown): close dropdown onClickOutside #640
fix(dropdown): close dropdown onClickOutside #640
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #640 +/- ##
==========================================
+ Coverage 99.42% 99.52% +0.09%
==========================================
Files 130 130
Lines 6440 6460 +20
Branches 481 491 +10
==========================================
+ Hits 6403 6429 +26
+ Misses 37 31 -6
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Hi, @Tejas9535. Thanks for your interest to work on this one, but I'm pretty sure that just changing the documentation will not fix the issue. I do recommend you check the video that I posted on the issue. The problem is that once you click on some item at the Dropdown, it can't be closed by clicking outside of it. I do expect that when the Dropdown has |
Hi @rluders , |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, mostly code style
As a fix I removed dismissOnClick={false} this from the Dropdown component so it is closed onCickOutside or when user selects one item from the dropdown fix #527
… false Added Ref and wrapped whole component around it and added closeOnOutside even for dismissOnClick is set to false so now even if dismissOnClick is set to false it'll close on outside click
formated files acording to style #527
I still have the problem, I'll try to record a video to demonstrate it 'cause it is hard to explain. |
I can open the dropdown and close it without any problem. However, if I click into some dropdown option and then click outside, it doesn't close, well... if I click in some specific places if closes (at the I'm using Brave, but it seems that it also happens on Firefox. Screen.Recording.2023-03-08.at.12.04.36.mov |
@rluders I can't replace that on Firefox, personally. So I'm not sure what's happening, to be honest. |
This one was solved by #840 |
As a fix, I have added the functionality of auto close whenever the user clicks outside regardless of onDismissClick
fix #527
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
Breaking changes
Please document the breaking changes if suitable.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist: