|
@ -5,7 +5,7 @@ import RcTable, { Summary } from 'rc-table'; |
|
|
import { TableProps as RcTableProps, INTERNAL_HOOKS } from 'rc-table/lib/Table'; |
|
|
import { TableProps as RcTableProps, INTERNAL_HOOKS } from 'rc-table/lib/Table'; |
|
|
import { convertChildrenToColumns } from 'rc-table/lib/hooks/useColumns'; |
|
|
import { convertChildrenToColumns } from 'rc-table/lib/hooks/useColumns'; |
|
|
import Spin, { SpinProps } from '../spin'; |
|
|
import Spin, { SpinProps } from '../spin'; |
|
|
import Pagination, { PaginationConfig } from '../pagination'; |
|
|
import Pagination from '../pagination'; |
|
|
import { ConfigContext } from '../config-provider/context'; |
|
|
import { ConfigContext } from '../config-provider/context'; |
|
|
import usePagination, { DEFAULT_PAGE_SIZE, getPaginationParam } from './hooks/usePagination'; |
|
|
import usePagination, { DEFAULT_PAGE_SIZE, getPaginationParam } from './hooks/usePagination'; |
|
|
import useLazyKVMap from './hooks/useLazyKVMap'; |
|
|
import useLazyKVMap from './hooks/useLazyKVMap'; |
|
@ -72,7 +72,7 @@ export interface TableProps<RecordType> |
|
|
locale?: TableLocale; |
|
|
locale?: TableLocale; |
|
|
|
|
|
|
|
|
onChange?: ( |
|
|
onChange?: ( |
|
|
pagination: PaginationConfig, |
|
|
pagination: TablePaginationConfig, |
|
|
filters: Record<string, Key[] | null>, |
|
|
filters: Record<string, Key[] | null>, |
|
|
sorter: SorterResult<RecordType> | SorterResult<RecordType>[], |
|
|
sorter: SorterResult<RecordType> | SorterResult<RecordType>[], |
|
|
extra: TableCurrentDataSource<RecordType>, |
|
|
extra: TableCurrentDataSource<RecordType>, |
|
@ -396,7 +396,7 @@ function Table<RecordType extends object = any>(props: TableProps<RecordType>) { |
|
|
let topPaginationNode: React.ReactNode; |
|
|
let topPaginationNode: React.ReactNode; |
|
|
let bottomPaginationNode: React.ReactNode; |
|
|
let bottomPaginationNode: React.ReactNode; |
|
|
if (pagination !== false) { |
|
|
if (pagination !== false) { |
|
|
let paginationSize: PaginationConfig['size']; |
|
|
let paginationSize: TablePaginationConfig['size']; |
|
|
if (mergedPagination.size) { |
|
|
if (mergedPagination.size) { |
|
|
paginationSize = mergedPagination.size; |
|
|
paginationSize = mergedPagination.size; |
|
|
} else { |
|
|
} else { |
|
|