From c1c23619de32f1e0df9b0610e7b1ce1057b96fc7 Mon Sep 17 00:00:00 2001 From: pqhuy1987 Date: Tue, 21 Apr 2026 15:06:40 +0700 Subject: [PATCH] =?UTF-8?q?[CLAUDE]=20FE:=20DataTable=20skeleton=20rows=20?= =?UTF-8?q?khi=20loading=20(thay=20'=C4=90ang=20t=E1=BA=A3i=E2=80=A6'=20te?= =?UTF-8?q?xt=20=C4=91=C6=A1n=20gi=E1=BA=A3n)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fe-admin/src/components/DataTable.tsx | 19 +++++++++++-------- fe-user/src/components/DataTable.tsx | 19 +++++++++++-------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/fe-admin/src/components/DataTable.tsx b/fe-admin/src/components/DataTable.tsx index 4b49f37..ddc682f 100644 --- a/fe-admin/src/components/DataTable.tsx +++ b/fe-admin/src/components/DataTable.tsx @@ -66,16 +66,19 @@ export function DataTable({ - {isLoading && ( - - - Đang tải… - - - )} + {isLoading && + Array.from({ length: 5 }).map((_, i) => ( + + {columns.map(c => ( + +
+ + ))} + + ))} {!isLoading && rows.length === 0 && ( - + {empty ?? 'Không có dữ liệu'} diff --git a/fe-user/src/components/DataTable.tsx b/fe-user/src/components/DataTable.tsx index 4b49f37..ddc682f 100644 --- a/fe-user/src/components/DataTable.tsx +++ b/fe-user/src/components/DataTable.tsx @@ -66,16 +66,19 @@ export function DataTable({ - {isLoading && ( - - - Đang tải… - - - )} + {isLoading && + Array.from({ length: 5 }).map((_, i) => ( + + {columns.map(c => ( + +
+ + ))} + + ))} {!isLoading && rows.length === 0 && ( - + {empty ?? 'Không có dữ liệu'}