Browse Source

Fix Table type (#24114)

Co-authored-by: soroka_av <soroka_av@st.by>
pull/24117/head
sorteam 5 years ago
committed by GitHub
parent
commit
b73e84da9b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      components/table/Table.tsx

6
components/table/Table.tsx

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

Loading…
Cancel
Save