fix: InvestigationDialog overflow issue (#669)
Co-authored-by: Andy <119136210+AndyMik90@users.noreply.github.com>
This commit is contained in:
+4
-1
@@ -144,7 +144,10 @@ export function InvestigationDialog({
|
||||
{selectedCommentIds.length === comments.length ? 'Deselect All' : 'Select All'}
|
||||
</Button>
|
||||
</div>
|
||||
<ScrollArea className="flex-1 min-h-0 border rounded-md">
|
||||
<ScrollArea
|
||||
className="flex min-h-0 border rounded-md"
|
||||
viewportClassName="h-auto"
|
||||
>
|
||||
<div className="p-2 space-y-2">
|
||||
{comments.map((comment) => (
|
||||
<div
|
||||
|
||||
+4
-1
@@ -141,7 +141,10 @@ export function InvestigationDialog({
|
||||
{selectedNoteIds.length === notes.length ? t('investigation.deselectAll') : t('investigation.selectAll')}
|
||||
</Button>
|
||||
</div>
|
||||
<ScrollArea className="flex-1 min-h-0 border rounded-md">
|
||||
<ScrollArea
|
||||
className="flex min-h-0 border rounded-md"
|
||||
viewportClassName="h-auto"
|
||||
>
|
||||
<div className="p-2 space-y-2">
|
||||
{notes.map((note) => (
|
||||
<button
|
||||
|
||||
@@ -4,14 +4,18 @@ import { cn } from '../../lib/utils';
|
||||
|
||||
const ScrollArea = React.forwardRef<
|
||||
React.ElementRef<typeof ScrollAreaPrimitive.Root>,
|
||||
React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>
|
||||
>(({ className, children, ...props }, ref) => (
|
||||
React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> & {
|
||||
viewportClassName?: string;
|
||||
}
|
||||
>(({ className, children, viewportClassName, ...props }, ref) => (
|
||||
<ScrollAreaPrimitive.Root
|
||||
ref={ref}
|
||||
className={cn('relative overflow-hidden', className)}
|
||||
{...props}
|
||||
>
|
||||
<ScrollAreaPrimitive.Viewport className="h-full w-full rounded-[inherit]">
|
||||
<ScrollAreaPrimitive.Viewport
|
||||
className={cn('h-full w-full rounded-[inherit]', viewportClassName)}
|
||||
>
|
||||
{children}
|
||||
</ScrollAreaPrimitive.Viewport>
|
||||
<ScrollBar />
|
||||
|
||||
Reference in New Issue
Block a user