Fix incompatible type error for Table[size] prop

pull/11090/head
Tomáš Szabo 7 years ago committed by 偏右
parent babbbdd4e5
commit bf5b6ae1f3

@ -20,6 +20,7 @@ import { flatArray, treeMap, flatFilter, normalizeColumns } from './util';
import { SpinProps } from '../spin';
import {
TableProps,
TableSize,
TableState,
TableComponents,
RowSelectionType,
@ -88,7 +89,7 @@ export default class Table<T> extends React.Component<TableProps<T>, TableState<
prefixCls: 'ant-table',
useFixedHeader: false,
className: '',
size: 'large',
size: 'default' as TableSize,
loading: false,
bordered: false,
indentSize: 20,

@ -84,12 +84,13 @@ export interface SorterResult<T> {
field: string;
columnKey: string;
}
export type TableSize = 'default' | 'middle' | 'small';
export interface TableProps<T> {
prefixCls?: string;
dropdownPrefixCls?: string;
rowSelection?: TableRowSelection<T>;
pagination?: PaginationConfig | false;
size?: 'default' | 'middle' | 'small';
size?: TableSize;
dataSource?: T[];
components?: TableComponents;
columns?: ColumnProps<T>[];

Loading…
Cancel
Save