mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-07 09:26:06 +08:00
fix: table export ColumnProps
(#21321)
This commit is contained in:
parent
4192c1f6d9
commit
297c3961ea
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import Table from '../Table';
|
import Table from '../Table';
|
||||||
|
import { ColumnProps } from '..';
|
||||||
|
|
||||||
const { Column, ColumnGroup } = Table;
|
const { Column, ColumnGroup } = Table;
|
||||||
|
|
||||||
@ -27,4 +28,20 @@ describe('Table.typescript', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('Table.typescript types', () => {
|
||||||
|
it('ColumnProps', () => {
|
||||||
|
interface User {
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const columns: ColumnProps<User>[] = [
|
||||||
|
{
|
||||||
|
title: 'Name',
|
||||||
|
dataIndex: 'name',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
expect(columns).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
/* eslint-enable */
|
/* eslint-enable */
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import Table, { TableProps, TablePaginationConfig } from './Table';
|
import Table, { TableProps, TablePaginationConfig } from './Table';
|
||||||
|
|
||||||
|
export { ColumnProps } from './Column';
|
||||||
export { ColumnsType, ColumnType, ColumnGroupType } from './interface';
|
export { ColumnsType, ColumnType, ColumnGroupType } from './interface';
|
||||||
export { TableProps, TablePaginationConfig };
|
export { TableProps, TablePaginationConfig };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user