fix(반응형): 모바일 width 에서 카드 뷰 + 이력 모달 스크롤 누락

- ResponsiveDataView: 모바일 카드 뷰 (lg 미만) + 카드 스켈레톤에 scrollContainer 모드의 max-h + overflow-y-auto 적용. 데스크톱 테이블만 적용돼 있던 누락 픽스
- TableHistoryModal: timeline/detail 탭의 ScrollArea 고정 h-[500px] → 모바일 h-[300px] sm:h-[500px] 적응형. DialogContent max-h-[90vh] 와 충돌 방지

증상: 브라우저 width 좁아질 때 카드 그리드/이력 타임라인이 viewport 너머로 잘리고 스크롤 안 됨.
This commit is contained in:
2026-05-13 08:08:58 +09:00
parent 3eeb0764bf
commit 0d5d1fe10d
2 changed files with 6 additions and 2 deletions
@@ -166,6 +166,7 @@ export function ResponsiveDataView<T>({
<div
className={cn(
"grid gap-4 sm:grid-cols-2 lg:hidden",
scrollContainer && "max-h-[calc(100vh-280px)] overflow-y-auto",
cardContainerClassName
)}
>
@@ -286,6 +287,9 @@ export function ResponsiveDataView<T>({
<div
className={cn(
"grid gap-4 sm:grid-cols-2 lg:hidden",
// scrollContainer 모드: 카드 뷰도 자체 세로 스크롤. 부모가 overflow-hidden 이라
// 별도 height 제약 없으면 카드들이 잘려 보임. 데스크톱 테이블과 동일 viewport 기준.
scrollContainer && "max-h-[calc(100vh-280px)] overflow-y-auto",
cardContainerClassName
)}
>
@@ -292,7 +292,7 @@ export function TableHistoryModal({
{/* 타임라인 뷰 */}
<TabsContent value="timeline">
<ScrollArea className="h-[500px] w-full rounded-md border p-4">
<ScrollArea className="h-[300px] w-full rounded-md border p-4 sm:h-[500px]">
{timeline.length === 0 ? (
<div className="flex flex-col items-center justify-center py-12 text-center">
<Clock className="text-muted-foreground mb-2 h-12 w-12" />
@@ -347,7 +347,7 @@ export function TableHistoryModal({
{/* 상세 내역 뷰 */}
<TabsContent value="detail">
<ScrollArea className="h-[500px] w-full rounded-md border">
<ScrollArea className="h-[300px] w-full rounded-md border sm:h-[500px]">
{detailRecords.length === 0 ? (
<div className="flex flex-col items-center justify-center py-12 text-center">
<FileEdit className="text-muted-foreground mb-2 h-12 w-12" />