Skip to content

Commit

Permalink
fix: scrollArea cant scroll when set max-height
Browse files Browse the repository at this point in the history
  • Loading branch information
shaddollxz committed Apr 18, 2024
1 parent 9aaaf42 commit 6b87b1d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions apps/www/registry/default/ui/scroll-area.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ const ScrollArea = React.forwardRef<
>(({ className, children, ...props }, ref) => (
<ScrollAreaPrimitive.Root
ref={ref}
className={cn("relative overflow-hidden", className)}
className={cn("relative flex flex-col overflow-hidden", className)}
{...props}
>
<ScrollAreaPrimitive.Viewport className="h-full w-full rounded-[inherit]">
<ScrollAreaPrimitive.Viewport className="w-full grow rounded-[inherit]">
{children}
</ScrollAreaPrimitive.Viewport>
<ScrollBar />
Expand Down
4 changes: 2 additions & 2 deletions apps/www/registry/new-york/ui/scroll-area.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ const ScrollArea = React.forwardRef<
>(({ className, children, ...props }, ref) => (
<ScrollAreaPrimitive.Root
ref={ref}
className={cn("relative overflow-hidden", className)}
className={cn("relative flex flex-col overflow-hidden", className)}
{...props}
>
<ScrollAreaPrimitive.Viewport className="h-full w-full rounded-[inherit]">
<ScrollAreaPrimitive.Viewport className="w-full grow rounded-[inherit]">
{children}
</ScrollAreaPrimitive.Viewport>
<ScrollBar />
Expand Down

0 comments on commit 6b87b1d

Please sign in to comment.