@meta-1/design 0.0.195 → 0.0.196
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
|
@@ -50,7 +50,6 @@ export type DataTableColumn<TData> = ColumnDef<TData, unknown> & {
|
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
export interface DataTableProps<TData> {
|
|
53
|
-
autoHidePagination?: boolean;
|
|
54
53
|
inCard?: boolean;
|
|
55
54
|
columns: DataTableColumn<TData>[];
|
|
56
55
|
data: TData[];
|
|
@@ -173,7 +172,6 @@ export function DataTable<TData>(props: DataTableProps<TData>) {
|
|
|
173
172
|
load,
|
|
174
173
|
cellHandles,
|
|
175
174
|
showHeader = true,
|
|
176
|
-
autoHidePagination = true,
|
|
177
175
|
inCard = false,
|
|
178
176
|
maxHeight,
|
|
179
177
|
} = props;
|
|
@@ -360,11 +358,8 @@ export function DataTable<TData>(props: DataTableProps<TData>) {
|
|
|
360
358
|
const showToolbar = useMemo(() => filter || showVisibilityControl, [filter, showVisibilityControl]);
|
|
361
359
|
|
|
362
360
|
const showPagination = useMemo(() => {
|
|
363
|
-
if (autoHidePagination) {
|
|
364
|
-
return pagination && (pagination as PaginationProps).total > (pagination as PaginationProps).pageSize;
|
|
365
|
-
}
|
|
366
361
|
return pagination;
|
|
367
|
-
}, [pagination
|
|
362
|
+
}, [pagination]);
|
|
368
363
|
|
|
369
364
|
// 渲染表头的通用函数
|
|
370
365
|
const renderTableHeader = () => {
|