-
Notifications
You must be signed in to change notification settings - Fork 217
feat: add triggerRef prop to dropdown
#4285
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: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -63,6 +63,13 @@ export interface DropdownProps extends ExpandToViewport { | |
| */ | ||
| trigger: React.ReactNode; | ||
|
|
||
| /** | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might update this comment after API proposal for trigger ref. |
||
| * Optional ref to the trigger element. When provided, the trigger will not be wrapped in a div, | ||
| * and the element's `id` attribute will be used as the referrer ID for portal-mode dropdowns. | ||
| * The trigger element must have a unique `id` set. | ||
| */ | ||
| triggerRef?: React.RefObject<HTMLElement>; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we use getTrigger() instead?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What would be the purpose of By the way: After the proposal, we don't want the |
||
|
|
||
| /** | ||
| * "Sticky" header of the dropdown content | ||
| */ | ||
|
|
||
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.
Trigger can be any HTML element