Permalink
Browse files

Fix incompatible type error for Table[size] prop

  • Loading branch information...
deftomat authored and afc163 committed Jun 27, 2018
1 parent babbbdd commit bf5b6ae1f3b5da4629a7d10a2d1764eaa3fbbb04
Showing with 4 additions and 2 deletions.
  1. +2 −1 components/table/Table.tsx
  2. +2 −1 components/table/interface.tsx
@@ -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>[];

0 comments on commit bf5b6ae

Please sign in to comment.