-
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] asChild
on Viewport
is not working correctly
#1666
Comments
I think we can remove the additional UPD: It will not work, as I see in the code now, the div used to measure content size. |
Any updates on this issue? |
I just ran into this issue because I'm using https://www.framer.com/motion/ to animate some elements inside the viewport of a ScrollArea, and in order to allow Framer Motion's automatic "layout" animations within scrollable containers, the scrollable container (in this case, the ScrollArea's Viewport) needs to become a |
@benoitgrelard I have just encountered this issue. This is due to the fact that when the viewport, which has The problem here is that Maybe it would be possible to remove |
Bug report
When using
asChild
onViewport
, the functionality is lost.This is probably due to the fact that there's an extra node around
children
.I think the solution is to use
Slottable
probably.Reproducible example
https://codesandbox.io/s/scrollarea-viewport-aschild-bug-y46g5q?file=/App.js
Suggested solution
Additional context
Your environment
The text was updated successfully, but these errors were encountered: