-
Notifications
You must be signed in to change notification settings - Fork 27
fix(SelectInput): click oustide should work and size fix #5491
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
base: beta
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 8afb4da The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
84c804e
to
7b20bee
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## beta #5491 +/- ##
==========================================
+ Coverage 92.19% 92.22% +0.02%
==========================================
Files 274 283 +9
Lines 7807 7752 -55
Branches 3264 3212 -52
==========================================
- Hits 7198 7149 -49
+ Misses 609 603 -6
... and 6 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
7b20bee
to
0f82f61
Compare
const handleClickOutside = useCallback( | ||
(event: MouseEvent) => { | ||
if ( | ||
event.target instanceof Node && | ||
ref.current && | ||
!ref.current.contains(event.target) && | ||
refSelect.current && | ||
!refSelect.current.contains(event.target) | ||
) { | ||
setIsDropdownVisible(false) | ||
} | ||
}, | ||
[setIsDropdownVisible, refSelect], | ||
) | ||
|
||
useEffect(() => { | ||
document.addEventListener('mouseup', handleClickOutside) | ||
|
||
return () => { | ||
document.removeEventListener('mouseup', handleClickOutside) | ||
} | ||
}, [handleClickOutside]) | ||
|
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.
This is already handled into the popup component it makes a duplicate. Maybe the issue is related to popup?
ea6b2fc
to
4077f70
Compare
941b320
to
a6ca909
Compare
4357b70
to
2806dad
Compare
4077f70
to
1d9035a
Compare
1d9035a
to
0d0ce70
Compare
0d0ce70
to
8afb4da
Compare
Summary
Type
Summarise concisely:
What is expected?
SelectInput
:Before:

After:
