import React from 'react'; import { Table } from 'antd'; import type { TableColumnsType } from 'antd'; interface DataType { key: React.Key; name: string; age: number; address: string; } const columns: TableColumnsType = [ { title: 'Name', dataIndex: 'name', }, { title: 'Age', dataIndex: 'age', }, { title: 'Address', dataIndex: 'address', }, ]; const dataSource = Array.from({ length: 200 }).map((_, key) => ({ key, name: 'Sample Name', age: 30 + (key % 5), address: `Sample Address ${key}`, })); const App: React.FC = () => (
columns={columns} dataSource={dataSource} size="small" pagination={{ defaultCurrent: 13 }} />
); export default App;