@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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meta-1/design",
3
- "version": "0.0.198",
3
+ "version": "0.0.199",
4
4
  "keywords": [
5
5
  "easykit",
6
6
  "design",
@@ -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
- return pagination;
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
  // 渲染表头的通用函数