fix: InvestigationDialog overflow issue (#669)

Co-authored-by: Andy <119136210+AndyMik90@users.noreply.github.com>
This commit is contained in:
Masanori Uehara
2026-01-06 21:25:04 +09:00
committed by GitHub
parent 84bc52264f
commit df57fbf8bc
3 changed files with 15 additions and 5 deletions
@@ -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
@@ -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 />