-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[select] feat(Select): new prop "matchTargetWidth" #4841
[select] feat(Select): new prop "matchTargetWidth" #4841
Conversation
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.
Neat solution, that's cool that we can do this with popper modifiers. It would be great to add this feature to Popover2 as well, but that can be in a separate PR. Left a few code style comments in places I'd like cleaned up.
order: 800, | ||
}; | ||
|
||
popoverProps.usePortal = false; |
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.
is this strictly necessary? if so, we should make a note of it in the matchTargetWidth
prop documentation
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.
yup, it is necessary. I've updated the prop docs with a note!
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.
cool 👍🏽
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.
nice, almost there! I just have a few small style nits I'd like to fix before merging
order: 800, | ||
}; | ||
|
||
popoverProps.usePortal = false; |
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.
cool 👍🏽
docs preview looks good |
Fixes #2956
Checklist
Changes proposed in this pull request:
Added a prop
matchTargetWidth
that will make theSelect
component's popover have the same width as the target. This was done using a modifier passed to PopoverPropsScreenshot
Before:
After: