Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix incompatible type error for Table[size] prop
  • Loading branch information
deftomat authored and afc163 committed Jun 27, 2018
1 parent babbbdd commit bf5b6ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion components/table/Table.tsx
Expand Up @@ -20,6 +20,7 @@ import { flatArray, treeMap, flatFilter, normalizeColumns } from './util';
import { SpinProps } from '../spin';
import {
TableProps,
TableSize,
TableState,
TableComponents,
RowSelectionType,
Expand Down Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion components/table/interface.tsx
Expand Up @@ -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>[];
Expand Down

0 comments on commit bf5b6ae

Please sign in to comment.