-
Notifications
You must be signed in to change notification settings - Fork 878
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
[ScrollArea] display: table is altering width on a vertical scroll element #2722
Comments
Hey team, we also suffering with that problem. Is there any progress about it? |
Duplicate of #926 |
Planning on addressing this soon. |
If anyone is still having this issue, one way you can force the width to be the same as a parent is adding manual styling to the div with display:table like so:
|
But I suppose this is fixed in #2945? I haven't tested it since I don't think this has made it into any release yet. |
I updated to 1.1.0 but still I added a <ScrollAreaPrimitive.Viewport className="size-full rounded-[inherit] *:!block">
{children}
</ScrollAreaPrimitive.Viewport> |
I use a less invasive variant, where I overwrite the display property only for this element: <ScrollAreaPrimitive.Viewport className=“size-full rounded-[inherit] [&>div]:!block”>
{children}
</ScrollAreaPrimitive.Viewport> |
Whats the status of this? Just ran into the same issue.. |
Seems radix is busy |
Bug report
Reference:
primitives/packages/react/scroll-area/src/ScrollArea.tsx
Lines 176 to 185 in c31c972
Current Behavior
Due to the
display: table
property, my list which is supposed to scroll vertically, is now being expanded horizontally as well since the text overflows, I've set the text to truncate based on the parent's width but because of this property my parent is expanding to fit the children.Expected behavior
Respect the width if scroll is vertical and vice versa.
Suggested solution
Maybe another way to expand to full size which targets only one dimension?
Your environment
The text was updated successfully, but these errors were encountered: