import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area'; import * as React from 'react'; import { cn } from '@/lib/utils'; export const VirtualScrollArea = React.forwardRef< HTMLDivElement, { children: React.ReactNode; className?: string; } >(({ children, className }, ref) => { // The ref MUST point directly to the scrollable element // This element MUST have: // 1. overflow-y-auto (or overflow: auto) // 2. A constrained height (via flex-1 min-h-0 or fixed height) return (