Skip to content
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

Horizontal Scrollbar Thumb Grow #1276

Closed
rizaldywirawan opened this issue Aug 17, 2023 · 3 comments · Fixed by #1296
Closed

Horizontal Scrollbar Thumb Grow #1276

rizaldywirawan opened this issue Aug 17, 2023 · 3 comments · Fixed by #1296

Comments

@rizaldywirawan
Copy link

rizaldywirawan commented Aug 17, 2023

Holla folks,

Seems like the horizontal scrollbar thumb has a bug caused by the flex-1 on the ScrollAreaPrimitive.ScrollAreaThumb.

Actually this flex-1 is used by the vertical scrollbar.

Horizontal.Scrollbar.Bug.mp4

How to fix:
The quick fix here is make a condition where only add the flex-1 for the vertical scrollbar only. For example:
<ScrollAreaPrimitive.ScrollAreaThumb className={cn("h-full bg-primary-100 border border-primary-500 relative rounded-full", orientation === "vertical" && 'flex-1')} />

@SoyDiego
Copy link
Contributor

SoyDiego commented Aug 20, 2023

className={cn("h-full bg-primary-100 border border-primary-500 relative rounded-full", orientation === "vertical" && 'flex-1')}

Hi @rizaldywirawan I'm trying to replicate the problem because I cannot see the problem.
Also I watched your video but I cannot understand what is the problem. I see the thumb bar OK.
Can you give me more details, please? :)

EDIT ⚠️

I saw the problem. I will create a PR :)

@rizaldywirawan
Copy link
Author

@SoyDiego Thank you so much for your help.

@SoyDiego
Copy link
Contributor

SoyDiego commented Aug 20, 2023

@SoyDiego Thank you so much for your help.

Hi again @rizaldywirawan, I did a PR applying your solution and works ok.
You can check here: #1296.
This are my first PR's in this project so I hopefully all It's ok.
Now we should wait if Shadcn Team approve it.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants