|
|
|
@ -283,6 +283,7 @@ Properties for row selection.
|
|
|
|
|
```tsx
|
|
|
|
|
import { Table } from 'antd';
|
|
|
|
|
import type { ColumnsType } from 'antd/es/table';
|
|
|
|
|
import React from 'react';
|
|
|
|
|
|
|
|
|
|
interface User {
|
|
|
|
|
key: number;
|
|
|
|
@ -304,7 +305,7 @@ const data: User[] = [
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
export default () => (
|
|
|
|
|
const Demo: React.FC = () => (
|
|
|
|
|
<>
|
|
|
|
|
<Table<User> columns={columns} dataSource={data} />
|
|
|
|
|
{/* JSX style usage */}
|
|
|
|
@ -313,6 +314,8 @@ export default () => (
|
|
|
|
|
</Table>
|
|
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
export default Demo;
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Here is the [CodeSandbox for TypeScript](https://codesandbox.io/s/serene-platform-0jo5t).
|
|
|
|
|