Skip to content

[ScrollArea] asChild on Viewport is not working correctly #1666

Open
@benoitgrelard

Description

@benoitgrelard

Bug report

When using asChild on Viewport, 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

Software Name(s) Version
Radix Package(s)
React n/a
Browser
Assistive tech
Node n/a
npm/yarn
Operating System

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions