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'}