-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
feat: Adds more customization properties to DropdownContainer #22031
feat: Adds more customization properties to DropdownContainer #22031
Conversation
Codecov Report
@@ Coverage Diff @@
## master #22031 +/- ##
=======================================
Coverage 66.99% 66.99%
=======================================
Files 1814 1815 +1
Lines 69485 69528 +43
Branches 7473 7480 +7
=======================================
+ Hits 46549 46579 +30
- Misses 21012 21019 +7
- Partials 1924 1930 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
/** | ||
* Displayed count in the popover trigger. | ||
*/ | ||
popoverTriggerCount?: number; |
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.
I think that we need to display the number of active filters in the dropdown. Since I don't think that the outside components now which filters are in the dropdown, I think that popoverTriggerCount
needs to be a function that takes the elements in popover as an argument and returns a number. WDYT?
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.
External components will know which filters are in the dropdown using onOverflowingStateChange
😉
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.
Oh nice!
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.
LGTM
SUMMARY
Adds more customization properties to
DropdownContainer
:popoverRef
to enable additional behaviors such as scrolling to a position when openingpopoverTriggerCount
to modify the default counting behaviorref
with anopen
function to programmatically open the popoverFollow-up of #21974
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Screen.Recording.2022-11-03.at.3.36.32.PM.mov
TESTING INSTRUCTIONS
Check the video for instructions.
ADDITIONAL INFORMATION