fix: typescript define (#19780)

* ColumnGroupType should be antd's

* columns should not be from rc-table
This commit is contained in:
jeessy2 2019-11-19 10:03:03 +08:00 committed by 二货机器人
parent 5d98667687
commit 23f74eccbe
2 changed files with 6 additions and 1 deletions

View File

@ -56,11 +56,13 @@ export interface TableProps<RecordType>
| 'internalHooks'
| 'internalRefs'
| 'data'
| 'columns'
| 'expandIconColumnIndex'
| 'scroll'
> {
dropdownPrefixCls?: string;
dataSource?: RcTableProps<RecordType>['data'];
columns?: ColumnsType<RecordType>;
pagination?: false | TablePaginationConfig;
loading?: boolean | SpinProps;
size?: TableSize;

View File

@ -1,6 +1,5 @@
import {
GetRowKey,
ColumnGroupType,
ColumnType as RcColumnType,
ExpandableConfig,
} from 'rc-table/lib/interface';
@ -94,6 +93,10 @@ export interface ColumnType<RecordType> extends RcColumnType<RecordType> {
onFilterDropdownVisibleChange?: (visible: boolean) => void;
}
export interface ColumnGroupType<RecordType> extends ColumnType<RecordType> {
children: ColumnsType<RecordType>
}
export type ColumnsType<RecordType = unknown> = (
| ColumnGroupType<RecordType>
| ColumnType<RecordType>