@meta-1/design 0.0.198 → 0.0.199
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -358,7 +358,13 @@ export function DataTable<TData>(props: DataTableProps<TData>) {
|
|
|
358
358
|
const showToolbar = useMemo(() => filter || showVisibilityControl, [filter, showVisibilityControl]);
|
|
359
359
|
|
|
360
360
|
const showPagination = useMemo(() => {
|
|
361
|
-
|
|
361
|
+
if (!pagination) {
|
|
362
|
+
return false;
|
|
363
|
+
}
|
|
364
|
+
if (typeof pagination === "boolean") {
|
|
365
|
+
return pagination;
|
|
366
|
+
}
|
|
367
|
+
return pagination.total > 0;
|
|
362
368
|
}, [pagination]);
|
|
363
369
|
|
|
364
370
|
// 渲染表头的通用函数
|