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

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

Loading…
Cancel
Save