Description:
I am encountering a ContextError when using the ScrollArea component in a SolidJS project using the components generated by the Park UI CLI.
Current Implementation:
TypeScript
<ScrollArea.Root>
<ScrollArea.Viewport>
<ScrollArea.Content>
Hello
</ScrollArea.Content>
</ScrollArea.Viewport>
<ScrollArea.Scrollbar />
<ScrollArea.Corner />
</ScrollArea.Root>
The Issue:
- With the implementation above (as the official docs suggest), the console throws:
ContextError: useScrollAreaScrollbarContext returned undefined. Seems you forgot to wrap component within <ScrollAreaScrollbarProvider />
- The generated
ui/scroll-area.tsx components are already wrapped with withProvider/withContext, which I believe should handle the context injection automatically as per standard Park UI architecture.
- There is no exported
ScrollArea.ScrollbarProvider or anything of the sort in the library to manually wrap the component, even if that were the intended workaround.
Expected Behavior:
The ScrollArea.Scrollbar should already wrap its own Provider if necessary, or at least have such an export and have the suggested usage in the docs properly corrected.
Environment:
- Framework: SolidJS
- Component Library: Park UI (latest)
- Implementation: Standard generated components via CLI.
Description:
I am encountering a ContextError when using the
ScrollAreacomponent in a SolidJS project using the components generated by the Park UI CLI.Current Implementation:
TypeScript
<ScrollArea.Root>
<ScrollArea.Viewport>
<ScrollArea.Content>
Hello
</ScrollArea.Content>
</ScrollArea.Viewport>
<ScrollArea.Scrollbar />
<ScrollArea.Corner />
</ScrollArea.Root>
The Issue:
ContextError: useScrollAreaScrollbarContext returned undefined. Seems you forgot to wrap component within <ScrollAreaScrollbarProvider />ui/scroll-area.tsxcomponents are already wrapped withwithProvider/withContext, which I believe should handle the context injection automatically as per standard Park UI architecture.ScrollArea.ScrollbarProvideror anything of the sort in the library to manually wrap the component, even if that were the intended workaround.Expected Behavior:
The
ScrollArea.Scrollbarshould already wrap its ownProviderif necessary, or at least have such an export and have the suggested usage in the docs properly corrected.Environment: