-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[Joy] Select popup should have max-height #36156
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Netlify deploy previewBundle size report |
Please run |
@Vivek-Prajapatii Thanks for opening the PR but I think you have to fix the implementation, not the demo file. |
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.
Please update the implementation instead of the demo file.
This comment was marked as outdated.
This comment was marked as outdated.
@Vivek-Prajapatii you can add |
This comment was marked as outdated.
This comment was marked as outdated.
minWidth: 'max-content', // prevent options from shrinking if some of them is wider than the Select's root. | ||
maxHeight: 300, | ||
overflow: 'auto', | ||
width: 'max-content', // prevent options from shrinking if some of them is wider than the Select's root. |
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.
@Vivek-Prajapatii May I ask why minWidth
is changed to width
?
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 comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
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 for submitting the PR! I have updated the docs and demos, let me know what you think.
This comment was marked as outdated.
This comment was marked as outdated.
@@ -240,6 +241,8 @@ const SelectListbox = styled(StyledList, { | |||
'--List-item-stickyTop': 'calc(var(--List-padding, var(--List-divider-gap)) * -1)', // negative amount of the List's padding block | |||
...scopedVariables, | |||
minWidth: 'max-content', // prevent options from shrinking if some of them is wider than the Select's root. | |||
maxHeight: '44vh', // the best value from what I tried so far which does not cause screen flicker when listbox is open. |
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.
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.
Issue created #38610
Closes #36115