mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-07 09:26:06 +08:00
Fix incompatible type error for Table[size] prop
This commit is contained in:
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…
Reference in New Issue
Block a user