mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 02:59:58 +08:00
fix: typescript define (#19780)
* ColumnGroupType should be antd's * columns should not be from rc-table
This commit is contained in:
parent
5d98667687
commit
23f74eccbe
@ -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;
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user