"use strict";(self.webpackChunkantd=self.webpackChunkantd||[]).push([[7812],{792562:function(p,l,r){r.r(l);var g=r(502143),b=r(968521),h=r(720719),v=r(28840),o=r(759907),a=r(828089),Z=r(825673),y=r(902068),k=r(574399),f=r(863942),x=r(316073),w=r(24628),S=r(719260),_=r(956140),d=r(127179),s=r(905388),L=r(40428),T=r(606965),I=r(268696),C=r(587302),t=r(424128),R=r(249706),N=r(795127),P=r(116846),A=r(212039),D=r(73024),B=r(553913),c=r(606641),i=r(667294),e=r(370917);function u(){var m=(0,c.eL)(),n=m.texts;return(0,e.tZ)(c.dY,null,(0,e.tZ)(i.Fragment,null,(0,e.tZ)("div",{className:"markdown"},(0,e.tZ)("p",null,n[0].value),(0,e.tZ)("h2",{id:"when-to-use"},(0,e.tZ)(t.Z,{"aria-hidden":"true",tabIndex:"-1",href:"#when-to-use",sourceType:"a"},(0,e.tZ)("span",{className:"icon icon-link"})),"When To Use"),(0,e.tZ)("ul",null,(0,e.tZ)("li",null,n[1].value),(0,e.tZ)("li",null,n[2].value)),(0,e.tZ)("h2",{id:"how-to-use"},(0,e.tZ)(t.Z,{"aria-hidden":"true",tabIndex:"-1",href:"#how-to-use",sourceType:"a"},(0,e.tZ)("span",{className:"icon icon-link"})),"How To Use"),(0,e.tZ)("p",null,n[3].value,(0,e.tZ)("code",null,n[4].value),n[5].value),(0,e.tZ)(o.Z,{lang:"jsx"},n[6].value),(0,e.tZ)("h2",{id:"promotion"},(0,e.tZ)(t.Z,{"aria-hidden":"true",tabIndex:"-1",href:"#promotion",sourceType:"a"},(0,e.tZ)("span",{className:"icon icon-link"})),"Promotion"),(0,e.tZ)("ul",null,(0,e.tZ)("li",null,(0,e.tZ)(t.Z,{href:"https://kitchen.alipay.com",sourceType:"a"},n[7].value)),(0,e.tZ)("li",null,(0,e.tZ)(t.Z,{href:"https://procomponents.ant.design/en-US/components/table",sourceType:"a"},n[8].value)),(0,e.tZ)("li",null,(0,e.tZ)(t.Z,{href:"https://github.com/antvis/s2/",sourceType:"a"},n[9].value))),(0,e.tZ)("h2",{id:"examples"},(0,e.tZ)(t.Z,{"aria-hidden":"true",tabIndex:"-1",href:"#examples",sourceType:"a"},(0,e.tZ)("span",{className:"icon icon-link"})),"Examples")),(0,e.tZ)(s.Z,{items:[{demo:{id:"components-table-demo-basic"},previewerProps:{title:"Basic Usage",filename:"components/table/demo/basic.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React from 'react'; import { Space, Table, Tag } from 'antd'; const columns = [ { title: 'Name', dataIndex: 'name', key: 'name', render: (text) => {text}, }, { title: 'Age', dataIndex: 'age', key: 'age', }, { title: 'Address', dataIndex: 'address', key: 'address', }, { title: 'Tags', key: 'tags', dataIndex: 'tags', render: (_, { tags }) => ( <> {tags.map((tag) => { let color = tag.length > 5 ? 'geekblue' : 'green'; if (tag === 'loser') { color = 'volcano'; } return ( {tag.toUpperCase()} ); })} ), }, { title: 'Action', key: 'action', render: (_, record) => ( Invite {record.name} Delete ), }, ]; const data = [ { key: '1', name: 'John Brown', age: 32, address: 'New York No. 1 Lake Park', tags: ['nice', 'developer'], }, { key: '2', name: 'Jim Green', age: 42, address: 'London No. 1 Lake Park', tags: ['loser'], }, { key: '3', name: 'Joe Black', age: 32, address: 'Sydney No. 1 Lake Park', tags: ['cool', 'teacher'], }, ]; const App = () => ; export default App; `,description:"

Simple table with actions.

"}},{demo:{id:"components-table-demo-jsx"},previewerProps:{title:"JSX style API",filename:"components/table/demo/jsx.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React from 'react'; import { Space, Table, Tag } from 'antd'; const { Column, ColumnGroup } = Table; const data = [ { key: '1', firstName: 'John', lastName: 'Brown', age: 32, address: 'New York No. 1 Lake Park', tags: ['nice', 'developer'], }, { key: '2', firstName: 'Jim', lastName: 'Green', age: 42, address: 'London No. 1 Lake Park', tags: ['loser'], }, { key: '3', firstName: 'Joe', lastName: 'Black', age: 32, address: 'Sydney No. 1 Lake Park', tags: ['cool', 'teacher'], }, ]; const App = () => (
( <> {tags.map((tag) => ( {tag} ))} )} /> ( Invite {record.lastName} Delete )} />
); export default App; `,description:`

Using JSX style API (introduced in 2.5.0)

Since this is just a syntax sugar for the prop columns, you can't compose Column and ColumnGroup with other Components.

`}},{demo:{id:"components-table-demo-row-selection"},previewerProps:{title:"selection",filename:"components/table/demo/row-selection.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React, { useState } from 'react'; import { Divider, Radio, Table } from 'antd'; const columns = [ { title: 'Name', dataIndex: 'name', render: (text) => {text}, }, { title: 'Age', dataIndex: 'age', }, { title: 'Address', dataIndex: 'address', }, ]; const data = [ { key: '1', name: 'John Brown', age: 32, address: 'New York No. 1 Lake Park', }, { key: '2', name: 'Jim Green', age: 42, address: 'London No. 1 Lake Park', }, { key: '3', name: 'Joe Black', age: 32, address: 'Sydney No. 1 Lake Park', }, { key: '4', name: 'Disabled User', age: 99, address: 'Sydney No. 1 Lake Park', }, ]; // rowSelection object indicates the need for row selection const rowSelection = { onChange: (selectedRowKeys, selectedRows) => { console.log(\`selectedRowKeys: \${selectedRowKeys}\`, 'selectedRows: ', selectedRows); }, getCheckboxProps: (record) => ({ disabled: record.name === 'Disabled User', // Column configuration not to be checked name: record.name, }), }; const App = () => { const [selectionType, setSelectionType] = useState('checkbox'); return (
{ setSelectionType(value); }} value={selectionType} > Checkbox radio ); }; export default App; `,description:`

Rows can be selectable by making first column as a selectable column. You can use rowSelection.type to set selection type. Default is checkbox.

selection happens when clicking checkbox by default. You can see https://codesandbox.io/s/000vqw38rl if you need row-click selection behavior.

`}},{demo:{id:"components-table-demo-row-selection-and-operation"},previewerProps:{title:"Selection and operation",filename:"components/table/demo/row-selection-and-operation.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React, { useState } from 'react'; import { Button, Table } from 'antd'; const columns = [ { title: 'Name', dataIndex: 'name', }, { title: 'Age', dataIndex: 'age', }, { title: 'Address', dataIndex: 'address', }, ]; const data = []; for (let i = 0; i < 46; i++) { data.push({ key: i, name: \`Edward King \${i}\`, age: 32, address: \`London, Park Lane no. \${i}\`, }); } const App = () => { const [selectedRowKeys, setSelectedRowKeys] = useState([]); const [loading, setLoading] = useState(false); const start = () => { setLoading(true); // ajax request after empty completing setTimeout(() => { setSelectedRowKeys([]); setLoading(false); }, 1000); }; const onSelectChange = (newSelectedRowKeys) => { console.log('selectedRowKeys changed: ', newSelectedRowKeys); setSelectedRowKeys(newSelectedRowKeys); }; const rowSelection = { selectedRowKeys, onChange: onSelectChange, }; const hasSelected = selectedRowKeys.length > 0; return (
{hasSelected ? \`Selected \${selectedRowKeys.length} items\` : ''}
); }; export default App; `,description:"

To perform operations and clear selections after selecting some rows, use rowSelection.selectedRowKeys to control selected rows.

"}},{demo:{id:"components-table-demo-row-selection-custom"},previewerProps:{title:"Custom selection",filename:"components/table/demo/row-selection-custom.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React, { useState } from 'react'; import { Table } from 'antd'; const columns = [ { title: 'Name', dataIndex: 'name', }, { title: 'Age', dataIndex: 'age', }, { title: 'Address', dataIndex: 'address', }, ]; const data = []; for (let i = 0; i < 46; i++) { data.push({ key: i, name: \`Edward King \${i}\`, age: 32, address: \`London, Park Lane no. \${i}\`, }); } const App = () => { const [selectedRowKeys, setSelectedRowKeys] = useState([]); const onSelectChange = (newSelectedRowKeys) => { console.log('selectedRowKeys changed: ', newSelectedRowKeys); setSelectedRowKeys(newSelectedRowKeys); }; const rowSelection = { selectedRowKeys, onChange: onSelectChange, selections: [ Table.SELECTION_ALL, Table.SELECTION_INVERT, Table.SELECTION_NONE, { key: 'odd', text: 'Select Odd Row', onSelect: (changeableRowKeys) => { let newSelectedRowKeys = []; newSelectedRowKeys = changeableRowKeys.filter((_, index) => { if (index % 2 !== 0) { return false; } return true; }); setSelectedRowKeys(newSelectedRowKeys); }, }, { key: 'even', text: 'Select Even Row', onSelect: (changeableRowKeys) => { let newSelectedRowKeys = []; newSelectedRowKeys = changeableRowKeys.filter((_, index) => { if (index % 2 !== 0) { return true; } return false; }); setSelectedRowKeys(newSelectedRowKeys); }, }, ], }; return
; }; export default App; `,description:"

Use rowSelection.selections custom selections, default no select dropdown, show default selections via setting to true.

"}},{demo:{id:"components-table-demo-row-selection-debug"},previewerProps:{debug:!0,title:"Selection Perf",filename:"components/table/demo/row-selection-debug.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React, { useState } from 'react'; import { Table, InputNumber } from 'antd'; const RenderTimes = () => { const timesRef = React.useRef(0); timesRef.current += 1; return {timesRef.current}; }; const shouldCellUpdate = (record, prevRecord) => record !== prevRecord; const columns = [ { title: 'Name', dataIndex: 'name', shouldCellUpdate, }, { title: 'Age', dataIndex: 'age', shouldCellUpdate, }, { title: 'Address', dataIndex: 'address', shouldCellUpdate, render: (addr) => ( <> {addr} ), }, ]; function genData(count) { const data = []; for (let i = 0; i < count; i++) { data.push({ key: i, name: \`Edward King \${i}\`, age: 32, address: \`London, Park Lane no. \${i}\`, }); } return data; } const App = () => { const [data, setData] = useState(genData(50)); const [selectedRowKeys, setSelectedRowKeys] = useState([]); const onSelectChange = (newSelectedRowKeys) => { console.log('selectedRowKeys changed: ', newSelectedRowKeys); setSelectedRowKeys(newSelectedRowKeys); }; const rowSelection = { selectedRowKeys, onChange: onSelectChange, }; return ( <> { setData(genData(cnt || 0)); }} />
); }; export default App; `,description:"

High cost render performance debugging.

"}},{demo:{id:"components-table-demo-head"},previewerProps:{title:"Filter and sorter",filename:"components/table/demo/head.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React from 'react'; import { Table } from 'antd'; const columns = [ { title: 'Name', dataIndex: 'name', filters: [ { text: 'Joe', value: 'Joe', }, { text: 'Jim', value: 'Jim', }, { text: 'Submenu', value: 'Submenu', children: [ { text: 'Green', value: 'Green', }, { text: 'Black', value: 'Black', }, ], }, ], // specify the condition of filtering result // here is that finding the name started with \`value\` onFilter: (value, record) => record.name.indexOf(value) === 0, sorter: (a, b) => a.name.length - b.name.length, sortDirections: ['descend'], }, { title: 'Age', dataIndex: 'age', defaultSortOrder: 'descend', sorter: (a, b) => a.age - b.age, }, { title: 'Address', dataIndex: 'address', filters: [ { text: 'London', value: 'London', }, { text: 'New York', value: 'New York', }, ], onFilter: (value, record) => record.address.indexOf(value) === 0, }, ]; const data = [ { key: '1', name: 'John Brown', age: 32, address: 'New York No. 1 Lake Park', }, { key: '2', name: 'Jim Green', age: 42, address: 'London No. 1 Lake Park', }, { key: '3', name: 'Joe Black', age: 32, address: 'Sydney No. 1 Lake Park', }, { key: '4', name: 'Jim Red', age: 32, address: 'London No. 2 Lake Park', }, ]; const onChange = (pagination, filters, sorter, extra) => { console.log('params', pagination, filters, sorter, extra); }; const App = () =>
; export default App; `,description:`

Use filters to generate filter menu in columns, onFilter to determine filtered result, and filterMultiple to indicate whether it's multiple or single selection.

Uses defaultFilteredValue to make a column filtered by default.

Use sorter to make a column sortable. sorter can be a function of the type function(a, b) { ... } for sorting data locally.

sortDirections: ['ascend' | 'descend'] defines available sort methods for each columns, effective for all columns when set on table props. You can set as ['ascend', 'descend', 'ascend'] to prevent sorter back to default status.

Uses defaultSortOrder to make a column sorted by default.

If a sortOrder or defaultSortOrder is specified with the value ascend or descend, you can access this value from within the function passed to the sorter as explained above. Such a function can take the form: function(a, b, sortOrder) { ... }.

`}},{demo:{id:"components-table-demo-filter-in-tree"},previewerProps:{title:"Filter in Tree",filename:"components/table/demo/filter-in-tree.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React from 'react'; import { Table } from 'antd'; const columns = [ { title: 'Name', dataIndex: 'name', filters: [ { text: 'Joe', value: 'Joe', }, { text: 'Category 1', value: 'Category 1', children: [ { text: 'Yellow', value: 'Yellow', }, { text: 'Pink', value: 'Pink', }, ], }, { text: 'Category 2', value: 'Category 2', children: [ { text: 'Green', value: 'Green', }, { text: 'Black', value: 'Black', }, ], }, ], filterMode: 'tree', filterSearch: true, onFilter: (value, record) => record.name.includes(value), width: '30%', }, { title: 'Age', dataIndex: 'age', sorter: (a, b) => a.age - b.age, }, { title: 'Address', dataIndex: 'address', filters: [ { text: 'London', value: 'London', }, { text: 'New York', value: 'New York', }, ], onFilter: (value, record) => record.address.startsWith(value), filterSearch: true, width: '40%', }, ]; const data = [ { key: '1', name: 'John Brown', age: 32, address: 'New York No. 1 Lake Park', }, { key: '2', name: 'Jim Green', age: 42, address: 'London No. 1 Lake Park', }, { key: '3', name: 'Joe Black', age: 32, address: 'Sydney No. 1 Lake Park', }, { key: '4', name: 'Jim Red', age: 32, address: 'London No. 2 Lake Park', }, ]; const onChange = (pagination, filters, sorter, extra) => { console.log('params', pagination, filters, sorter, extra); }; const App = () =>
; export default App; `,description:`

You can use filterMode to change default filter interface, options: menu(default) and tree.

filterSearch is used for making filter dropdown items searchable.

`}},{demo:{id:"components-table-demo-filter-search"},previewerProps:{title:"Filter search",filename:"components/table/demo/filter-search.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React from 'react'; import { Table } from 'antd'; const columns = [ { title: 'Name', dataIndex: 'name', filters: [ { text: 'Joe', value: 'Joe', }, { text: 'Category 1', value: 'Category 1', }, { text: 'Category 2', value: 'Category 2', }, ], filterMode: 'tree', filterSearch: true, onFilter: (value, record) => record.name.startsWith(value), width: '30%', }, { title: 'Age', dataIndex: 'age', sorter: (a, b) => a.age - b.age, }, { title: 'Address', dataIndex: 'address', filters: [ { text: 'London', value: 'London', }, { text: 'New York', value: 'New York', }, ], onFilter: (value, record) => record.address.startsWith(value), filterSearch: true, width: '40%', }, ]; const data = [ { key: '1', name: 'John Brown', age: 32, address: 'New York No. 1 Lake Park', }, { key: '2', name: 'Jim Green', age: 42, address: 'London No. 1 Lake Park', }, { key: '3', name: 'Joe Black', age: 32, address: 'Sydney No. 1 Lake Park', }, { key: '4', name: 'Jim Red', age: 32, address: 'London No. 2 Lake Park', }, ]; const onChange = (pagination, filters, sorter, extra) => { console.log('params', pagination, filters, sorter, extra); }; const App = () =>
; export default App; `,description:"

filterSearch is used to enable search of filter items, and you can set a custom filter method through filterSearch:(input, record) => boolean.

"}},{demo:{id:"components-table-demo-multiple-sorter"},previewerProps:{title:"Multiple sorter",filename:"components/table/demo/multiple-sorter.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React from 'react'; import { Table } from 'antd'; const columns = [ { title: 'Name', dataIndex: 'name', }, { title: 'Chinese Score', dataIndex: 'chinese', sorter: { compare: (a, b) => a.chinese - b.chinese, multiple: 3, }, }, { title: 'Math Score', dataIndex: 'math', sorter: { compare: (a, b) => a.math - b.math, multiple: 2, }, }, { title: 'English Score', dataIndex: 'english', sorter: { compare: (a, b) => a.english - b.english, multiple: 1, }, }, ]; const data = [ { key: '1', name: 'John Brown', chinese: 98, math: 60, english: 70, }, { key: '2', name: 'Jim Green', chinese: 98, math: 66, english: 89, }, { key: '3', name: 'Joe Black', chinese: 98, math: 90, english: 70, }, { key: '4', name: 'Jim Red', chinese: 88, math: 99, english: 89, }, ]; const onChange = (pagination, filters, sorter, extra) => { console.log('params', pagination, filters, sorter, extra); }; const App = () =>
; export default App; `,description:"

column.sorter support multiple to config the priority of sort columns. Though sorter.compare to customize compare function. You can also leave it empty to use the interactive only.

"}},{demo:{id:"components-table-demo-reset-filter"},previewerProps:{title:"Reset filters and sorters",filename:"components/table/demo/reset-filter.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React, { useState } from 'react'; import { Button, Space, Table } from 'antd'; const data = [ { key: '1', name: 'John Brown', age: 32, address: 'New York No. 1 Lake Park', }, { key: '2', name: 'Jim Green', age: 42, address: 'London No. 1 Lake Park', }, { key: '3', name: 'Joe Black', age: 32, address: 'Sydney No. 1 Lake Park', }, { key: '4', name: 'Jim Red', age: 32, address: 'London No. 2 Lake Park', }, ]; const App = () => { const [filteredInfo, setFilteredInfo] = useState({}); const [sortedInfo, setSortedInfo] = useState({}); const handleChange = (pagination, filters, sorter) => { console.log('Various parameters', pagination, filters, sorter); setFilteredInfo(filters); setSortedInfo(sorter); }; const clearFilters = () => { setFilteredInfo({}); }; const clearAll = () => { setFilteredInfo({}); setSortedInfo({}); }; const setAgeSort = () => { setSortedInfo({ order: 'descend', columnKey: 'age', }); }; const columns = [ { title: 'Name', dataIndex: 'name', key: 'name', filters: [ { text: 'Joe', value: 'Joe', }, { text: 'Jim', value: 'Jim', }, ], filteredValue: filteredInfo.name || null, onFilter: (value, record) => record.name.includes(value), sorter: (a, b) => a.name.length - b.name.length, sortOrder: sortedInfo.columnKey === 'name' ? sortedInfo.order : null, ellipsis: true, }, { title: 'Age', dataIndex: 'age', key: 'age', sorter: (a, b) => a.age - b.age, sortOrder: sortedInfo.columnKey === 'age' ? sortedInfo.order : null, ellipsis: true, }, { title: 'Address', dataIndex: 'address', key: 'address', filters: [ { text: 'London', value: 'London', }, { text: 'New York', value: 'New York', }, ], filteredValue: filteredInfo.address || null, onFilter: (value, record) => record.address.includes(value), sorter: (a, b) => a.address.length - b.address.length, sortOrder: sortedInfo.columnKey === 'address' ? sortedInfo.order : null, ellipsis: true, }, ]; return ( <>
); }; export default App; `,description:`

Control filters and sorters by filteredValue and sortOrder.

  1. Defining filteredValue or sortOrder means that it is in the controlled mode.
  2. Make sure sortOrder is assigned for only one column.
  3. column.key is required.
`}},{demo:{id:"components-table-demo-custom-filter-panel"},previewerProps:{title:"Customized filter panel",filename:"components/table/demo/custom-filter-panel.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import { SearchOutlined } from '@ant-design/icons'; import { Button, Input, Space, Table } from 'antd'; import React, { useRef, useState } from 'react'; import Highlighter from 'react-highlight-words'; const data = [ { key: '1', name: 'John Brown', age: 32, address: 'New York No. 1 Lake Park', }, { key: '2', name: 'Joe Black', age: 42, address: 'London No. 1 Lake Park', }, { key: '3', name: 'Jim Green', age: 32, address: 'Sydney No. 1 Lake Park', }, { key: '4', name: 'Jim Red', age: 32, address: 'London No. 2 Lake Park', }, ]; const App = () => { const [searchText, setSearchText] = useState(''); const [searchedColumn, setSearchedColumn] = useState(''); const searchInput = useRef(null); const handleSearch = (selectedKeys, confirm, dataIndex) => { confirm(); setSearchText(selectedKeys[0]); setSearchedColumn(dataIndex); }; const handleReset = (clearFilters) => { clearFilters(); setSearchText(''); }; const getColumnSearchProps = (dataIndex) => ({ filterDropdown: ({ setSelectedKeys, selectedKeys, confirm, clearFilters, close }) => (
e.stopPropagation()} > setSelectedKeys(e.target.value ? [e.target.value] : [])} onPressEnter={() => handleSearch(selectedKeys, confirm, dataIndex)} style={{ marginBottom: 8, display: 'block', }} />
), filterIcon: (filtered) => ( ), onFilter: (value, record) => record[dataIndex].toString().toLowerCase().includes(value.toLowerCase()), onFilterDropdownOpenChange: (visible) => { if (visible) { setTimeout(() => searchInput.current?.select(), 100); } }, render: (text) => searchedColumn === dataIndex ? ( ) : ( text ), }); const columns = [ { title: 'Name', dataIndex: 'name', key: 'name', width: '30%', ...getColumnSearchProps('name'), }, { title: 'Age', dataIndex: 'age', key: 'age', width: '20%', ...getColumnSearchProps('age'), }, { title: 'Address', dataIndex: 'address', key: 'address', ...getColumnSearchProps('address'), sorter: (a, b) => a.address.length - b.address.length, sortDirections: ['descend', 'ascend'], }, ]; return
; }; export default App; `,description:`

Implement a customized column search example via filterDropdown.

Add the boolean type parameter closeDropdown to the function clearFilters. Whether to close the filter menu is true by default. Add the boolean type parameter confirm to clear whether to submit the option during filtering. The default is true.

`}},{demo:{id:"components-table-demo-ajax"},previewerProps:{title:"Ajax",filename:"components/table/demo/ajax.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React, { useEffect, useState } from 'react'; import { Table } from 'antd'; import qs from 'qs'; const columns = [ { title: 'Name', dataIndex: 'name', sorter: true, render: (name) => \`\${name.first} \${name.last}\`, width: '20%', }, { title: 'Gender', dataIndex: 'gender', filters: [ { text: 'Male', value: 'male', }, { text: 'Female', value: 'female', }, ], width: '20%', }, { title: 'Email', dataIndex: 'email', }, ]; const getRandomuserParams = (params) => ({ results: params.pagination?.pageSize, page: params.pagination?.current, ...params, }); const App = () => { const [data, setData] = useState(); const [loading, setLoading] = useState(false); const [tableParams, setTableParams] = useState({ pagination: { current: 1, pageSize: 10, }, }); const fetchData = () => { setLoading(true); fetch(\`https://randomuser.me/api?\${qs.stringify(getRandomuserParams(tableParams))}\`) .then((res) => res.json()) .then(({ results }) => { setData(results); setLoading(false); setTableParams({ ...tableParams, pagination: { ...tableParams.pagination, total: 200, // 200 is mock data, you should read it from server // total: data.totalCount, }, }); }); }; useEffect(() => { fetchData(); }, [JSON.stringify(tableParams)]); const handleTableChange = (pagination, filters, sorter) => { setTableParams({ pagination, filters, ...sorter, }); // \`dataSource\` is useless since \`pageSize\` changed if (pagination.pageSize !== tableParams.pagination?.pageSize) { setData([]); } }; return (
record.login.uuid} dataSource={data} pagination={tableParams.pagination} loading={loading} onChange={handleTableChange} /> ); }; export default App; `,description:`

This example shows how to fetch and present data from a remote server, and how to implement filtering and sorting in server side by sending related parameters to server.

Setting rowSelection.preserveSelectedRowKeys to keep the key when enable selection.

Note, this example use Mock API that you can look up in Network Console.

`}},{demo:{id:"components-table-demo-size"},previewerProps:{title:"size",filename:"components/table/demo/size.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React from 'react'; import { Table, Divider } from 'antd'; const columns = [ { title: 'Name', dataIndex: 'name', }, { title: 'Age', dataIndex: 'age', }, { title: 'Address', dataIndex: 'address', }, ]; const data = [ { key: '1', name: 'John Brown', age: 32, address: 'New York No. 1 Lake Park', }, { key: '2', name: 'Jim Green', age: 42, address: 'London No. 1 Lake Park', }, { key: '3', name: 'Joe Black', age: 32, address: 'Sydney No. 1 Lake Park', }, ]; const App = () => ( <> Middle size table
Small size table
); export default App; `,description:"

There are two compacted table sizes: middle and small. The small size is used in Modals only.

"}},{demo:{id:"components-table-demo-narrow"},previewerProps:{debug:!0,title:"size",filename:"components/table/demo/narrow.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React from 'react'; import { Table } from 'antd'; const columns = [ { title: 'Name', dataIndex: 'name', }, { title: 'Age', dataIndex: 'age', }, { title: 'Address', dataIndex: 'address', }, ]; const data = []; for (let i = 0; i < 200; i += 1) { data.push({ key: i, name: 'Sample Name', age: 30 + (i % 5), address: \`Sample Address \${i}\`, }); } const App = () => (
); export default App; `,description:"

There are two compacted table sizes: middle and small. The small size is used in Modals only.

"}},{demo:{id:"components-table-demo-bordered"},previewerProps:{title:"border, title and footer",filename:"components/table/demo/bordered.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React from 'react'; import { Table } from 'antd'; const columns = [ { title: 'Name', dataIndex: 'name', render: (text) => {text}, }, { title: 'Cash Assets', className: 'column-money', dataIndex: 'money', align: 'right', }, { title: 'Address', dataIndex: 'address', }, ]; const data = [ { key: '1', name: 'John Brown', money: '\uFFE5300,000.00', address: 'New York No. 1 Lake Park', }, { key: '2', name: 'Jim Green', money: '\uFFE51,256,000.00', address: 'London No. 1 Lake Park', }, { key: '3', name: 'Joe Black', money: '\uFFE5120,000.00', address: 'Sydney No. 1 Lake Park', }, ]; const App = () => (
'Header'} footer={() => 'Footer'} /> ); export default App; `,description:"

Add border, title and footer for table.

"}},{demo:{id:"components-table-demo-expand"},previewerProps:{title:"Expandable Row",filename:"components/table/demo/expand.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React from 'react'; import { Table } from 'antd'; const columns = [ { title: 'Name', dataIndex: 'name', key: 'name', }, { title: 'Age', dataIndex: 'age', key: 'age', }, { title: 'Address', dataIndex: 'address', key: 'address', }, { title: 'Action', dataIndex: '', key: 'x', render: () => Delete, }, ]; const data = [ { key: 1, name: 'John Brown', age: 32, address: 'New York No. 1 Lake Park', description: 'My name is John Brown, I am 32 years old, living in New York No. 1 Lake Park.', }, { key: 2, name: 'Jim Green', age: 42, address: 'London No. 1 Lake Park', description: 'My name is Jim Green, I am 42 years old, living in London No. 1 Lake Park.', }, { key: 3, name: 'Not Expandable', age: 29, address: 'Jiangsu No. 1 Lake Park', description: 'This not expandable', }, { key: 4, name: 'Joe Black', age: 32, address: 'Sydney No. 1 Lake Park', description: 'My name is Joe Black, I am 32 years old, living in Sydney No. 1 Lake Park.', }, ]; const App = () => (
(

{record.description}

), rowExpandable: (record) => record.name !== 'Not Expandable', }} dataSource={data} /> ); export default App; `,description:"

When there's too much information to show and the table can't display all at once.

"}},{demo:{id:"components-table-demo-order-column"},previewerProps:{title:"Order Specific Column",filename:"components/table/demo/order-column.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React from 'react'; import { Table } from 'antd'; const columns = [ { title: 'Name', dataIndex: 'name', key: 'name', }, Table.EXPAND_COLUMN, { title: 'Age', dataIndex: 'age', key: 'age', }, Table.SELECTION_COLUMN, { title: 'Address', dataIndex: 'address', key: 'address', }, ]; const data = [ { key: 1, name: 'John Brown', age: 32, address: 'New York No. 1 Lake Park', description: 'My name is John Brown, I am 32 years old, living in New York No. 1 Lake Park.', }, { key: 2, name: 'Jim Green', age: 42, address: 'London No. 1 Lake Park', description: 'My name is Jim Green, I am 42 years old, living in London No. 1 Lake Park.', }, { key: 3, name: 'Not Expandable', age: 29, address: 'Jiangsu No. 1 Lake Park', description: 'This not expandable', }, { key: 4, name: 'Joe Black', age: 32, address: 'Sydney No. 1 Lake Park', description: 'My name is Joe Black, I am 32 years old, living in Sydney No. 1 Lake Park.', }, ]; const App = () => (
(

{record.description}

), }} dataSource={data} /> ); export default App; `,description:"

You can control the order of the expand and select columns by using Table.EXPAND_COLUMN and Table.SELECT_COLUMN.

"}},{demo:{id:"components-table-demo-colspan-rowspan"},previewerProps:{title:"colSpan and rowSpan",filename:"components/table/demo/colspan-rowspan.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React from 'react'; import { Table } from 'antd'; // In the fifth row, other columns are merged into first column // by setting it's colSpan to be 0 const sharedOnCell = (_, index) => { if (index === 1) { return { colSpan: 0, }; } return {}; }; const columns = [ { title: 'RowHead', dataIndex: 'key', rowScope: 'row', }, { title: 'Name', dataIndex: 'name', render: (text) => {text}, onCell: (_, index) => ({ colSpan: index === 1 ? 5 : 1, }), }, { title: 'Age', dataIndex: 'age', onCell: sharedOnCell, }, { title: 'Home phone', colSpan: 2, dataIndex: 'tel', onCell: (_, index) => { if (index === 3) { return { rowSpan: 2, }; } // These two are merged into above cell if (index === 4) { return { rowSpan: 0, }; } if (index === 1) { return { colSpan: 0, }; } return {}; }, }, { title: 'Phone', colSpan: 0, dataIndex: 'phone', onCell: sharedOnCell, }, { title: 'Address', dataIndex: 'address', onCell: sharedOnCell, }, ]; const data = [ { key: '1', name: 'John Brown', age: 32, tel: '0571-22098909', phone: 18889898989, address: 'New York No. 1 Lake Park', }, { key: '2', name: 'Jim Green', tel: '0571-22098333', phone: 18889898888, age: 42, address: 'London No. 1 Lake Park', }, { key: '3', name: 'Joe Black', age: 32, tel: '0575-22098909', phone: 18900010002, address: 'Sydney No. 1 Lake Park', }, { key: '4', name: 'Jim Red', age: 18, tel: '0575-22098909', phone: 18900010002, address: 'London No. 2 Lake Park', }, { key: '5', name: 'Jake White', age: 18, tel: '0575-22098909', phone: 18900010002, address: 'Dublin No. 2 Lake Park', }, ]; const App = () =>
; export default App; `,description:`

Table column title supports colSpan that set in column.

Table cell supports colSpan and rowSpan that set in render return object. When each of them is set to 0, the cell will not be rendered.

`}},{demo:{id:"components-table-demo-tree-data"},previewerProps:{title:"Tree data",filename:"components/table/demo/tree-data.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React, { useState } from 'react'; import { Space, Switch, Table } from 'antd'; const columns = [ { title: 'Name', dataIndex: 'name', key: 'name', }, { title: 'Age', dataIndex: 'age', key: 'age', width: '12%', }, { title: 'Address', dataIndex: 'address', width: '30%', key: 'address', }, ]; const data = [ { key: 1, name: 'John Brown sr.', age: 60, address: 'New York No. 1 Lake Park', children: [ { key: 11, name: 'John Brown', age: 42, address: 'New York No. 2 Lake Park', }, { key: 12, name: 'John Brown jr.', age: 30, address: 'New York No. 3 Lake Park', children: [ { key: 121, name: 'Jimmy Brown', age: 16, address: 'New York No. 3 Lake Park', }, ], }, { key: 13, name: 'Jim Green sr.', age: 72, address: 'London No. 1 Lake Park', children: [ { key: 131, name: 'Jim Green', age: 42, address: 'London No. 2 Lake Park', children: [ { key: 1311, name: 'Jim Green jr.', age: 25, address: 'London No. 3 Lake Park', }, { key: 1312, name: 'Jimmy Green sr.', age: 18, address: 'London No. 4 Lake Park', }, ], }, ], }, ], }, { key: 2, name: 'Joe Black', age: 32, address: 'Sydney No. 1 Lake Park', }, ]; // rowSelection objects indicates the need for row selection const rowSelection = { onChange: (selectedRowKeys, selectedRows) => { console.log(\`selectedRowKeys: \${selectedRowKeys}\`, 'selectedRows: ', selectedRows); }, onSelect: (record, selected, selectedRows) => { console.log(record, selected, selectedRows); }, onSelectAll: (selected, selectedRows, changeRows) => { console.log(selected, selectedRows, changeRows); }, }; const App = () => { const [checkStrictly, setCheckStrictly] = useState(false); return ( <> CheckStrictly:
); }; export default App; `,description:`

Display tree structure data in Table when there is field key children in dataSource, try to customize childrenColumnName property to avoid tree table structure.

You can control the indent width by setting indentSize.

`}},{demo:{id:"components-table-demo-tree-table-ellipsis"},previewerProps:{debug:!0,title:"Tree data ellipsis debug demo",filename:"components/table/demo/tree-table-ellipsis.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React, { useState } from 'react'; import { Space, Switch, Table } from 'antd'; const data = [ { key: 1, name: 'John Brown sr. John Brown sr. John Brown sr. John Brown sr. John Brown sr. John Brown sr.', age: 60, address: 'New York No. 1 Lake Park', children: [ { key: 11, name: 'John Brown sr. John Brown sr. John Brown sr. John Brown sr. John Brown sr. John Brown sr.', age: 42, address: 'New York No. 2 Lake Park', }, { key: 12, name: 'John Brown sr. John Brown sr. John Brown sr. John Brown sr. John Brown sr. John Brown sr.', age: 30, address: 'New York No. 3 Lake Park', children: [ { key: 121, name: 'John Brown sr. John Brown sr. John Brown sr. John Brown sr. John Brown sr. John Brown sr.', age: 16, address: 'New York No. 3 Lake Park', }, ], }, { key: 13, name: 'Jim Green sr. Jim Green sr. Jim Green sr. Jim Green sr.', age: 72, address: 'London No. 1 Lake Park', children: [ { key: 131, name: 'Jim Green. Jim Green. Jim Green. Jim Green. Jim Green. Jim Green.', age: 42, address: 'London No. 2 Lake Park', children: [ { key: 1311, name: 'Jim Green jr. Jim Green jr. Jim Green jr. Jim Green jr.', age: 25, address: 'London No. 3 Lake Park', }, { key: 1312, name: 'Jimmy Green sr. Jimmy Green sr. Jimmy Green sr.', age: 18, address: 'London No. 4 Lake Park', }, ], }, ], }, ], }, { key: 2, name: 'Joe Black', age: 32, address: 'Sydney No. 1 Lake Park', }, ]; const App = () => { const [fixed, setFixed] = useState(true); const columns = [ { title: 'Name', dataIndex: 'name', key: 'name', width: '30%', ellipsis: true, fixed, }, { title: 'Age', dataIndex: 'age', key: 'age', width: '12%', }, { title: 'Address', dataIndex: 'address', key: 'address', }, ]; return ( <> Fixed first column:
); }; export default App; `,description:'

https://github.com/ant-design/ant-design/issues/36583

'}},{demo:{id:"components-table-demo-fixed-header"},previewerProps:{title:"Fixed Header",filename:"components/table/demo/fixed-header.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React from 'react'; import { Table } from 'antd'; const columns = [ { title: 'Name', dataIndex: 'name', width: 150, }, { title: 'Age', dataIndex: 'age', width: 150, }, { title: 'Address', dataIndex: 'address', }, ]; const data = []; for (let i = 0; i < 100; i++) { data.push({ key: i, name: \`Edward King \${i}\`, age: 32, address: \`London, Park Lane no. \${i}\`, }); } const App = () => (
); export default App; `,description:`

Display large amounts of data in scrollable view.

Specify width of columns if header and cell do not align properly. If specified width is not working or have gutter between columns, please try to leave one column at least without width to fit fluid layout, or make sure no long word to break table layout.

`}},{demo:{id:"components-table-demo-fixed-columns"},previewerProps:{title:"Fixed Columns",filename:"components/table/demo/fixed-columns.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React from 'react'; import { Table } from 'antd'; const columns = [ { title: 'Full Name', width: 100, dataIndex: 'name', key: 'name', fixed: 'left', }, { title: 'Age', width: 100, dataIndex: 'age', key: 'age', fixed: 'left', sorter: true, }, { title: 'Column 1', dataIndex: 'address', key: '1', }, { title: 'Column 2', dataIndex: 'address', key: '2', }, { title: 'Column 3', dataIndex: 'address', key: '3', }, { title: 'Column 4', dataIndex: 'address', key: '4', }, { title: 'Column 5', dataIndex: 'address', key: '5', }, { title: 'Column 6', dataIndex: 'address', key: '6', }, { title: 'Column 7', dataIndex: 'address', key: '7', }, { title: 'Column 8', dataIndex: 'address', key: '8', }, { title: 'Action', key: 'operation', fixed: 'right', width: 100, render: () => action, }, ]; const data = [ { key: '1', name: 'John Brown', age: 32, address: 'New York Park', }, { key: '2', name: 'Jim Green', age: 40, address: 'London Park', }, ]; const App = () => (
); export default App; `,description:`

To fix some columns and scroll inside other columns, and you must set scroll.x meanwhile.

Specify the width of columns if header and cell do not align properly. If specified width is not working or have gutter between columns, please try to leave one column at least without width to fit fluid layout, or make sure no long word to break table layout.

A fixed value which is greater than table width for scroll.x is recommended. The sum of unfixed columns should not greater than scroll.x.

Note: v4 using sticky to implement fixed effect. IE 11 will downgrade to horizontal scroll.

`}},{demo:{id:"components-table-demo-fixed-columns-header"},previewerProps:{title:"Fixed Columns and Header",filename:"components/table/demo/fixed-columns-header.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React from 'react'; import { Table } from 'antd'; const columns = [ { title: 'Full Name', width: 100, dataIndex: 'name', key: 'name', fixed: 'left', }, { title: 'Age', width: 100, dataIndex: 'age', key: 'age', fixed: 'left', }, { title: 'Column 1', dataIndex: 'address', key: '1', width: 150, }, { title: 'Column 2', dataIndex: 'address', key: '2', width: 150, }, { title: 'Column 3', dataIndex: 'address', key: '3', width: 150, }, { title: 'Column 4', dataIndex: 'address', key: '4', width: 150, }, { title: 'Column 5', dataIndex: 'address', key: '5', width: 150, }, { title: 'Column 6', dataIndex: 'address', key: '6', width: 150, }, { title: 'Column 7', dataIndex: 'address', key: '7', width: 150, }, { title: 'Column 8', dataIndex: 'address', key: '8', }, { title: 'Action', key: 'operation', fixed: 'right', width: 100, render: () => action, }, ]; const data = []; for (let i = 0; i < 100; i++) { data.push({ key: i, name: \`Edward \${i}\`, age: 32, address: \`London Park no. \${i}\`, }); } const App = () => (
); export default App; `,description:`

A Solution for displaying large amounts of data with long columns.

Specify the width of columns if header and cell do not align properly. If specified width is not working or have gutter between columns, please try to leave one column at least without width to fit fluid layout, or make sure no long word to break table layout.

A fixed value which is greater than table width for scroll.x is recommended. The sum of unfixed columns should not greater than scroll.x.

`}},{demo:{id:"components-table-demo-grouping-columns"},previewerProps:{title:"Grouping table head",filename:"components/table/demo/grouping-columns.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React from 'react'; import { Table } from 'antd'; const columns = [ { title: 'Name', dataIndex: 'name', key: 'name', width: 100, fixed: 'left', filters: [ { text: 'Joe', value: 'Joe', }, { text: 'John', value: 'John', }, ], onFilter: (value, record) => record.name.indexOf(value) === 0, }, { title: 'Other', children: [ { title: 'Age', dataIndex: 'age', key: 'age', width: 150, sorter: (a, b) => a.age - b.age, }, { title: 'Address', children: [ { title: 'Street', dataIndex: 'street', key: 'street', width: 150, }, { title: 'Block', children: [ { title: 'Building', dataIndex: 'building', key: 'building', width: 100, }, { title: 'Door No.', dataIndex: 'number', key: 'number', width: 100, }, ], }, ], }, ], }, { title: 'Company', children: [ { title: 'Company Address', dataIndex: 'companyAddress', key: 'companyAddress', width: 200, }, { title: 'Company Name', dataIndex: 'companyName', key: 'companyName', }, ], }, { title: 'Gender', dataIndex: 'gender', key: 'gender', width: 80, fixed: 'right', }, ]; const data = []; for (let i = 0; i < 100; i++) { data.push({ key: i, name: 'John Brown', age: i + 1, street: 'Lake Park', building: 'C', number: 2035, companyAddress: 'Lake Street 42', companyName: 'SoftLake Co', gender: 'M', }); } const App = () => (
); export default App; `,description:"

Group table head with columns[n].children.

"}},{demo:{id:"components-table-demo-edit-cell"},previewerProps:{title:"Editable Cells",filename:"components/table/demo/edit-cell.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React, { useContext, useEffect, useRef, useState } from 'react'; import { Button, Form, Input, Popconfirm, Table } from 'antd'; const EditableContext = React.createContext(null); const EditableRow = ({ index, ...props }) => { const [form] = Form.useForm(); return ( ); }; const EditableCell = ({ title, editable, children, dataIndex, record, handleSave, ...restProps }) => { const [editing, setEditing] = useState(false); const inputRef = useRef(null); const form = useContext(EditableContext); useEffect(() => { if (editing) { inputRef.current.focus(); } }, [editing]); const toggleEdit = () => { setEditing(!editing); form.setFieldsValue({ [dataIndex]: record[dataIndex], }); }; const save = async () => { try { const values = await form.validateFields(); toggleEdit(); handleSave({ ...record, ...values, }); } catch (errInfo) { console.log('Save failed:', errInfo); } }; let childNode = children; if (editable) { childNode = editing ? ( ) : (
{children}
); } return ; }; const App = () => { const [dataSource, setDataSource] = useState([ { key: '0', name: 'Edward King 0', age: '32', address: 'London, Park Lane no. 0', }, { key: '1', name: 'Edward King 1', age: '32', address: 'London, Park Lane no. 1', }, ]); const [count, setCount] = useState(2); const handleDelete = (key) => { const newData = dataSource.filter((item) => item.key !== key); setDataSource(newData); }; const defaultColumns = [ { title: 'name', dataIndex: 'name', width: '30%', editable: true, }, { title: 'age', dataIndex: 'age', }, { title: 'address', dataIndex: 'address', }, { title: 'operation', dataIndex: 'operation', render: (_, record) => dataSource.length >= 1 ? ( handleDelete(record.key)}> Delete ) : null, }, ]; const handleAdd = () => { const newData = { key: count, name: \`Edward King \${count}\`, age: '32', address: \`London, Park Lane no. \${count}\`, }; setDataSource([...dataSource, newData]); setCount(count + 1); }; const handleSave = (row) => { const newData = [...dataSource]; const index = newData.findIndex((item) => row.key === item.key); const item = newData[index]; newData.splice(index, 1, { ...item, ...row, }); setDataSource(newData); }; const components = { body: { row: EditableRow, cell: EditableCell, }, }; const columns = defaultColumns.map((col) => { if (!col.editable) { return col; } return { ...col, onCell: (record) => ({ record, editable: col.editable, dataIndex: col.dataIndex, title: col.title, handleSave, }), }; }); return (
{childNode}
'editable-row'} bordered dataSource={dataSource} columns={columns} /> ); }; export default App; `,description:'

Table with editable cells. When work with shouldCellUpdate, please take care of closure.

',style:`.editable-cell { position: relative; } .editable-cell-value-wrap { padding: 5px 12px; cursor: pointer; } .editable-row:hover .editable-cell-value-wrap { padding: 4px 11px; border: 1px solid #d9d9d9; border-radius: 2px; }`}},{demo:{id:"components-table-demo-edit-row"},previewerProps:{title:"Editable Rows",filename:"components/table/demo/edit-row.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React, { useState } from 'react'; import { Form, Input, InputNumber, Popconfirm, Table, Typography } from 'antd'; const originData = []; for (let i = 0; i < 100; i++) { originData.push({ key: i.toString(), name: \`Edward \${i}\`, age: 32, address: \`London Park no. \${i}\`, }); } const EditableCell = ({ editing, dataIndex, title, inputType, record, index, children, ...restProps }) => { const inputNode = inputType === 'number' ? : ; return ( ); }; const App = () => { const [form] = Form.useForm(); const [data, setData] = useState(originData); const [editingKey, setEditingKey] = useState(''); const isEditing = (record) => record.key === editingKey; const edit = (record) => { form.setFieldsValue({ name: '', age: '', address: '', ...record, }); setEditingKey(record.key); }; const cancel = () => { setEditingKey(''); }; const save = async (key) => { try { const row = await form.validateFields(); const newData = [...data]; const index = newData.findIndex((item) => key === item.key); if (index > -1) { const item = newData[index]; newData.splice(index, 1, { ...item, ...row, }); setData(newData); setEditingKey(''); } else { newData.push(row); setData(newData); setEditingKey(''); } } catch (errInfo) { console.log('Validate Failed:', errInfo); } }; const columns = [ { title: 'name', dataIndex: 'name', width: '25%', editable: true, }, { title: 'age', dataIndex: 'age', width: '15%', editable: true, }, { title: 'address', dataIndex: 'address', width: '40%', editable: true, }, { title: 'operation', dataIndex: 'operation', render: (_, record) => { const editable = isEditing(record); return editable ? ( save(record.key)} style={{ marginRight: 8, }} > Save Cancel ) : ( edit(record)}> Edit ); }, }, ]; const mergedColumns = columns.map((col) => { if (!col.editable) { return col; } return { ...col, onCell: (record) => ({ record, inputType: col.dataIndex === 'age' ? 'number' : 'text', dataIndex: col.dataIndex, title: col.title, editing: isEditing(record), }), }; }); return (
{editing ? ( {inputNode} ) : ( children )}
); }; export default App; `,description:"

Table with editable rows.

",style:`.editable-row .ant-form-item-explain { position: absolute; top: 100%; font-size: 12px; }`}},{demo:{id:"components-table-demo-nested-table"},previewerProps:{title:"Nested tables",filename:"components/table/demo/nested-table.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React from 'react'; import { DownOutlined } from '@ant-design/icons'; import { Badge, Dropdown, Space, Table } from 'antd'; const items = [ { key: '1', label: 'Action 1', }, { key: '2', label: 'Action 2', }, ]; const App = () => { const expandedRowRender = () => { const columns = [ { title: 'Date', dataIndex: 'date', key: 'date', }, { title: 'Name', dataIndex: 'name', key: 'name', }, { title: 'Status', key: 'state', render: () => , }, { title: 'Upgrade Status', dataIndex: 'upgradeNum', key: 'upgradeNum', }, { title: 'Action', dataIndex: 'operation', key: 'operation', render: () => ( Pause Stop More ), }, ]; const data = []; for (let i = 0; i < 3; ++i) { data.push({ key: i.toString(), date: '2014-12-24 23:12:00', name: 'This is production name', upgradeNum: 'Upgraded: 56', }); } return
; }; const columns = [ { title: 'Name', dataIndex: 'name', key: 'name', }, { title: 'Platform', dataIndex: 'platform', key: 'platform', }, { title: 'Version', dataIndex: 'version', key: 'version', }, { title: 'Upgraded', dataIndex: 'upgradeNum', key: 'upgradeNum', }, { title: 'Creator', dataIndex: 'creator', key: 'creator', }, { title: 'Date', dataIndex: 'createdAt', key: 'createdAt', }, { title: 'Action', key: 'operation', render: () => Publish, }, ]; const data = []; for (let i = 0; i < 3; ++i) { data.push({ key: i.toString(), name: 'Screen', platform: 'iOS', version: '10.3.4.5654', upgradeNum: 500, creator: 'Jack', createdAt: '2014-12-24 23:12:00', }); } return ( <>
); }; export default App; `,description:"

Showing more detailed info of every row.

"}},{demo:{id:"components-table-demo-drag-sorting"},previewerProps:{title:"Drag sorting",filename:"components/table/demo/drag-sorting.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import { DndContext, PointerSensor, useSensor, useSensors } from '@dnd-kit/core'; import { restrictToVerticalAxis } from '@dnd-kit/modifiers'; import { SortableContext, arrayMove, useSortable, verticalListSortingStrategy, } from '@dnd-kit/sortable'; import { CSS } from '@dnd-kit/utilities'; import { Table } from 'antd'; import React, { useState } from 'react'; const columns = [ { title: 'Name', dataIndex: 'name', }, { title: 'Age', dataIndex: 'age', }, { title: 'Address', dataIndex: 'address', }, ]; const Row = (props) => { const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({ id: props['data-row-key'], }); const style = { ...props.style, transform: CSS.Transform.toString( transform && { ...transform, scaleY: 1, }, ), transition, cursor: 'move', ...(isDragging ? { position: 'relative', zIndex: 9999, } : {}), }; return ; }; const App = () => { const [dataSource, setDataSource] = useState([ { key: '1', name: 'John Brown', age: 32, address: 'Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text', }, { key: '2', name: 'Jim Green', age: 42, address: 'London No. 1 Lake Park', }, { key: '3', name: 'Joe Black', age: 32, address: 'Sidney No. 1 Lake Park', }, ]); const sensors = useSensors( useSensor(PointerSensor, { activationConstraint: { // https://docs.dndkit.com/api-documentation/sensors/pointer#activation-constraints distance: 1, }, }), ); const onDragEnd = ({ active, over }) => { if (active.id !== over?.id) { setDataSource((prev) => { const activeIndex = prev.findIndex((i) => i.key === active.id); const overIndex = prev.findIndex((i) => i.key === over?.id); return arrayMove(prev, activeIndex, overIndex); }); } }; return ( i.key)} strategy={verticalListSortingStrategy} >
); }; export default App; `,description:'

By using components, we can integrate table with dnd-kit to implement drag sorting function.

'}},{demo:{id:"components-table-demo-drag-sorting-handler"},previewerProps:{title:"Drag sorting with handler",filename:"components/table/demo/drag-sorting-handler.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import { MenuOutlined } from '@ant-design/icons'; import { DndContext } from '@dnd-kit/core'; import { restrictToVerticalAxis } from '@dnd-kit/modifiers'; import { arrayMove, SortableContext, useSortable, verticalListSortingStrategy, } from '@dnd-kit/sortable'; import { CSS } from '@dnd-kit/utilities'; import { Table } from 'antd'; import React, { useState } from 'react'; const columns = [ { key: 'sort', }, { title: 'Name', dataIndex: 'name', }, { title: 'Age', dataIndex: 'age', }, { title: 'Address', dataIndex: 'address', }, ]; const Row = ({ children, ...props }) => { const { attributes, listeners, setNodeRef, setActivatorNodeRef, transform, transition, isDragging, } = useSortable({ id: props['data-row-key'], }); const style = { ...props.style, transform: CSS.Transform.toString( transform && { ...transform, scaleY: 1, }, ), transition, ...(isDragging ? { position: 'relative', zIndex: 9999, } : {}), }; return ( {React.Children.map(children, (child) => { if (child.key === 'sort') { return React.cloneElement(child, { children: ( ), }); } return child; })} ); }; const App = () => { const [dataSource, setDataSource] = useState([ { key: '1', name: 'John Brown', age: 32, address: 'Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text', }, { key: '2', name: 'Jim Green', age: 42, address: 'London No. 1 Lake Park', }, { key: '3', name: 'Joe Black', age: 32, address: 'Sidney No. 1 Lake Park', }, ]); const onDragEnd = ({ active, over }) => { if (active.id !== over?.id) { setDataSource((previous) => { const activeIndex = previous.findIndex((i) => i.key === active.id); const overIndex = previous.findIndex((i) => i.key === over?.id); return arrayMove(previous, activeIndex, overIndex); }); } }; return ( i.key)} strategy={verticalListSortingStrategy} >
); }; export default App; `,description:'

Alternatively you can implement drag sorting with handler using dnd-kit.

'}},{demo:{id:"components-table-demo-resizable-column"},previewerProps:{debug:!0,title:"Resizable column",filename:"components/table/demo/resizable-column.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React, { useState } from 'react'; import { Table } from 'antd'; import { Resizable } from 'react-resizable'; const ResizableTitle = (props) => { const { onResize, width, ...restProps } = props; if (!width) { return
; } return ( { e.stopPropagation(); }} /> } onResize={onResize} draggableOpts={{ enableUserSelectHack: false, }} > ); }; const App = () => { const [columns, setColumns] = useState([ { title: 'Date', dataIndex: 'date', width: 200, }, { title: 'Amount', dataIndex: 'amount', width: 100, sorter: (a, b) => a.amount - b.amount, }, { title: 'Type', dataIndex: 'type', width: 100, }, { title: 'Note', dataIndex: 'note', width: 100, }, { title: 'Action', key: 'action', render: () => Delete, }, ]); const data = [ { key: 0, date: '2018-02-11', amount: 120, type: 'income', note: 'transfer', }, { key: 1, date: '2018-03-11', amount: 243, type: 'income', note: 'transfer', }, { key: 2, date: '2018-04-11', amount: 98, type: 'income', note: 'transfer', }, ]; const handleResize = (index) => (_, { size }) => { const newColumns = [...columns]; newColumns[index] = { ...newColumns[index], width: size.width, }; setColumns(newColumns); }; const mergeColumns = columns.map((col, index) => ({ ...col, onHeaderCell: (column) => ({ width: column.width, onResize: handleResize(index), }), })); return ( ); }; export default App; `,description:'

Implement resizable column by integrate with react-resizable. When sort needed, you can use additional mark to prevent resize trigger sort.

',style:`#components-table-demo-resizable-column .react-resizable { position: relative; background-clip: padding-box; } #components-table-demo-resizable-column .react-resizable-handle { position: absolute; right: -5px; bottom: 0; z-index: 1; width: 10px; height: 100%; cursor: col-resize; }`}},{demo:{id:"components-table-demo-ellipsis"},previewerProps:{title:"ellipsis column",filename:"components/table/demo/ellipsis.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React from 'react'; import { Table } from 'antd'; const columns = [ { title: 'Name', dataIndex: 'name', key: 'name', render: (text) => {text}, width: 150, }, { title: 'Age', dataIndex: 'age', key: 'age', width: 80, }, { title: 'Address', dataIndex: 'address', key: 'address 1', ellipsis: true, }, { title: 'Long Column Long Column Long Column', dataIndex: 'address', key: 'address 2', ellipsis: true, }, { title: 'Long Column Long Column', dataIndex: 'address', key: 'address 3', ellipsis: true, }, { title: 'Long Column', dataIndex: 'address', key: 'address 4', ellipsis: true, }, ]; const data = [ { key: '1', name: 'John Brown', age: 32, address: 'New York No. 1 Lake Park, New York No. 1 Lake Park', tags: ['nice', 'developer'], }, { key: '2', name: 'Jim Green', age: 42, address: 'London No. 2 Lake Park, London No. 2 Lake Park', tags: ['loser'], }, { key: '3', name: 'Joe Black', age: 32, address: 'Sydney No. 1 Lake Park, Sydney No. 1 Lake Park', tags: ['cool', 'teacher'], }, ]; const App = () =>
; export default App; `,description:`

Ellipsis cell content via setting column.ellipsis.

Cannot ellipsis table header with sorters and filters for now.

`}},{demo:{id:"components-table-demo-ellipsis-custom-tooltip"},previewerProps:{title:"ellipsis column custom tooltip",filename:"components/table/demo/ellipsis-custom-tooltip.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React from 'react'; import { Table, Tooltip } from 'antd'; const columns = [ { title: 'Name', dataIndex: 'name', key: 'name', render: (text) => {text}, width: 150, }, { title: 'Age', dataIndex: 'age', key: 'age', width: 80, }, { title: 'Address', dataIndex: 'address', key: 'address 1', ellipsis: { showTitle: false, }, render: (address) => ( {address} ), }, { title: 'Long Column Long Column Long Column', dataIndex: 'address', key: 'address 2', ellipsis: { showTitle: false, }, render: (address) => ( {address} ), }, { title: 'Long Column Long Column', dataIndex: 'address', key: 'address 3', ellipsis: { showTitle: false, }, render: (address) => ( {address} ), }, { title: 'Long Column', dataIndex: 'address', key: 'address 4', ellipsis: { showTitle: false, }, render: (address) => ( {address} ), }, ]; const data = [ { key: '1', name: 'John Brown', age: 32, address: 'New York No. 1 Lake Park, New York No. 1 Lake Park', }, { key: '2', name: 'Jim Green', age: 42, address: 'London No. 2 Lake Park, London No. 2 Lake Park', }, { key: '3', name: 'Joe Black', age: 32, address: 'Sydney No. 1 Lake Park, Sydney No. 1 Lake Park', }, ]; const App = () =>
; export default App; `,description:"

Ellipsis cell content via setting column.ellipsis.showTitle, use Tooltip instead of the html title attribute.

"}},{demo:{id:"components-table-demo-summary"},previewerProps:{title:"Summary",filename:"components/table/demo/summary.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React from 'react'; import { Table, Typography } from 'antd'; const { Text } = Typography; const columns = [ { title: 'Name', dataIndex: 'name', }, { title: 'Borrow', dataIndex: 'borrow', }, { title: 'Repayment', dataIndex: 'repayment', }, ]; const data = [ { key: '1', name: 'John Brown', borrow: 10, repayment: 33, }, { key: '2', name: 'Jim Green', borrow: 100, repayment: 0, }, { key: '3', name: 'Joe Black', borrow: 10, repayment: 10, }, { key: '4', name: 'Jim Red', borrow: 75, repayment: 45, }, ]; const fixedColumns = [ { title: 'Name', dataIndex: 'name', fixed: true, width: 100, }, { title: 'Description', dataIndex: 'description', }, ]; const fixedData = []; for (let i = 0; i < 20; i += 1) { fixedData.push({ key: i, name: ['Light', 'Bamboo', 'Little'][i % 3], description: 'Everything that has a beginning, has an end.', }); } const App = () => ( <>
{ let totalBorrow = 0; let totalRepayment = 0; pageData.forEach(({ borrow, repayment }) => { totalBorrow += borrow; totalRepayment += repayment; }); return ( <> Total {totalBorrow} {totalRepayment} Balance {totalBorrow - totalRepayment} ); }} />
( Summary This is a summary content )} /> ); export default App; `,description:"

Set summary content by summary prop. Sync column fixed status with Table.Summary.Cell. You can fixed it by set Table.Summary fixed prop(since 4.16.0).

"}},{demo:{id:"components-table-demo-virtual-list"},previewerProps:{title:"Virtual list",filename:"components/table/demo/virtual-list.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import { Table, theme } from 'antd'; import classNames from 'classnames'; import ResizeObserver from 'rc-resize-observer'; import React, { useEffect, useRef, useState } from 'react'; import { VariableSizeGrid as Grid } from 'react-window'; const VirtualTable = (props) => { const { columns, scroll } = props; const [tableWidth, setTableWidth] = useState(0); const { token } = theme.useToken(); const widthColumnCount = columns.filter(({ width }) => !width).length; const mergedColumns = columns.map((column) => { if (column.width) { return column; } return { ...column, width: Math.floor(tableWidth / widthColumnCount), }; }); const gridRef = useRef(); const [connectObject] = useState(() => { const obj = {}; Object.defineProperty(obj, 'scrollLeft', { get: () => { if (gridRef.current) { return gridRef.current?.state?.scrollLeft; } return null; }, set: (scrollLeft) => { if (gridRef.current) { gridRef.current.scrollTo({ scrollLeft, }); } }, }); return obj; }); const resetVirtualGrid = () => { gridRef.current?.resetAfterIndices({ columnIndex: 0, shouldForceUpdate: true, }); }; useEffect(() => resetVirtualGrid, [tableWidth]); const renderVirtualList = (rawData, { scrollbarSize, ref, onScroll }) => { ref.current = connectObject; const totalHeight = rawData.length * 54; return ( { const { width } = mergedColumns[index]; return totalHeight > scroll?.y && index === mergedColumns.length - 1 ? width - scrollbarSize - 1 : width; }} height={scroll.y} rowCount={rawData.length} rowHeight={() => 54} width={tableWidth} onScroll={({ scrollLeft }) => { onScroll({ scrollLeft, }); }} > {({ columnIndex, rowIndex, style }) => (
{rawData[rowIndex][mergedColumns[columnIndex].dataIndex]}
)}
); }; return ( { setTableWidth(width); }} >
); }; // Usage const columns = [ { title: 'A', dataIndex: 'key', width: 150, }, { title: 'B', dataIndex: 'key', }, { title: 'C', dataIndex: 'key', }, { title: 'D', dataIndex: 'key', }, { title: 'E', dataIndex: 'key', width: 200, }, { title: 'F', dataIndex: 'key', width: 100, }, ]; const data = Array.from( { length: 100000, }, (_, key) => ({ key, }), ); const App = () => ( ); export default App; `,description:"

Integrate virtual scroll with react-window to achieve a high performance table of 100,000 data.

",style:` .virtual-table .ant-table-container:before, .virtual-table .ant-table-container:after { display: none; }`}},{demo:{id:"components-table-demo-responsive"},previewerProps:{title:"Responsive",filename:"components/table/demo/responsive.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React from 'react'; import { Table } from 'antd'; const columns = [ { title: 'Name (all screens)', dataIndex: 'name', key: 'name', render: (text) => {text}, }, { title: 'Age (medium screen or bigger)', dataIndex: 'age', key: 'age', responsive: ['md'], }, { title: 'Address (large screen or bigger)', dataIndex: 'address', key: 'address', responsive: ['lg'], }, ]; const data = [ { key: '1', name: 'John Brown', age: 32, address: 'New York No. 1 Lake Park', }, ]; const App = () =>
; export default App; `,description:"

Responsive columns.

"}},{demo:{id:"components-table-demo-nest-table-border-debug"},previewerProps:{debug:!0,title:"Nested Bordered Table Debug",filename:"components/table/demo/nest-table-border-debug.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React, { useState } from 'react'; import { DownOutlined } from '@ant-design/icons'; import { Badge, Dropdown, Form, Space, Switch, Table } from 'antd'; const items = [ { key: '1', label: 'Action 1', }, { key: '2', label: 'Action 2', }, ]; const App = () => { const createExpandedRowRender = (bordered) => () => { const columns = [ { title: 'Date', dataIndex: 'date', key: 'date', }, { title: 'Name', dataIndex: 'name', key: 'name', }, { title: 'Status', key: 'state', render: () => ( Finished ), }, { title: 'Upgrade Status', dataIndex: 'upgradeNum', key: 'upgradeNum', }, { title: 'Action', dataIndex: 'operation', key: 'operation', render: () => ( Pause Stop More ), }, ]; const data = []; for (let i = 0; i < 3; ++i) { data.push({ key: i, date: '2014-12-24 23:12:00', name: 'This is production name', upgradeNum: 'Upgraded: 56', }); } return
; }; const columns = [ { title: 'Name', dataIndex: 'name', key: 'name', }, { title: 'Platform', dataIndex: 'platform', key: 'platform', }, { title: 'Version', dataIndex: 'version', key: 'version', }, { title: 'Upgraded', dataIndex: 'upgradeNum', key: 'upgradeNum', }, { title: 'Creator', dataIndex: 'creator', key: 'creator', }, { title: 'Date', dataIndex: 'createdAt', key: 'createdAt', }, { title: 'Action', key: 'operation', render: () => Publish, }, ]; const data = []; for (let i = 0; i < 3; ++i) { data.push({ key: i, name: 'Screem', platform: 'iOS', version: '10.3.4.5654', upgradeNum: 500, creator: 'Jack', createdAt: '2014-12-24 23:12:00', }); } const [rootTableBordered, setRootTableBordered] = useState(true); const [childTableBordered, setChildTableBordered] = useState(true); return ( <> setRootTableBordered(v)} /> setChildTableBordered(v)} />
'cool'} footer={() => 'cool'} columns={columns} expandable={{ expandedRowRender: createExpandedRowRender(childTableBordered), }} dataSource={data} bordered={rootTableBordered} /> ); }; export default App; `,description:"

To see if bordered style applied to other tables.

"}},{demo:{id:"components-table-demo-pagination"},previewerProps:{title:"Pagination Settings",filename:"components/table/demo/pagination.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React, { useState } from 'react'; import { Radio, Space, Table, Tag } from 'antd'; const topOptions = [ { label: 'topLeft', value: 'topLeft', }, { label: 'topCenter', value: 'topCenter', }, { label: 'topRight', value: 'topRight', }, { label: 'none', value: 'none', }, ]; const bottomOptions = [ { label: 'bottomLeft', value: 'bottomLeft', }, { label: 'bottomCenter', value: 'bottomCenter', }, { label: 'bottomRight', value: 'bottomRight', }, { label: 'none', value: 'none', }, ]; const columns = [ { title: 'Name', dataIndex: 'name', key: 'name', render: (text) => {text}, }, { title: 'Age', dataIndex: 'age', key: 'age', }, { title: 'Address', dataIndex: 'address', key: 'address', }, { title: 'Tags', key: 'tags', dataIndex: 'tags', render: (tags) => ( {tags.map((tag) => { let color = tag.length > 5 ? 'geekblue' : 'green'; if (tag === 'loser') { color = 'volcano'; } return ( {tag.toUpperCase()} ); })} ), }, { title: 'Action', key: 'action', render: (_, record) => ( Invite {record.name} Delete ), }, ]; const data = [ { key: '1', name: 'John Brown', age: 32, address: 'New York No. 1 Lake Park', tags: ['nice', 'developer'], }, { key: '2', name: 'Jim Green', age: 42, address: 'London No. 1 Lake Park', tags: ['loser'], }, { key: '3', name: 'Joe Black', age: 32, address: 'Sydney No. 1 Lake Park', tags: ['cool', 'teacher'], }, ]; const App = () => { const [top, setTop] = useState('topLeft'); const [bottom, setBottom] = useState('bottomRight'); return (
{ setTop(e.target.value); }} />
{ setBottom(e.target.value); }} />
); }; export default App; `,description:"

Table pagination settings.

"}},{demo:{id:"components-table-demo-row-selection-custom-debug"},previewerProps:{debug:!0,title:"Custom selection group",filename:"components/table/demo/row-selection-custom-debug.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React from 'react'; import { Table } from 'antd'; const columns = [ { title: 'Name', dataIndex: 'name', }, ]; const data = []; for (let i = 0; i < 46; i++) { data.push({ key: i, name: i % 2 === 0 ? \`Edward King \${i}\` : 'Another Row', }); } const App = () => { const rowSelection = { renderCell: (checked, _record, index, node) => ({ props: { rowSpan: index % 2 === 0 ? 2 : 0, }, children: ( <> {String(checked)}: {node} ), }), }; return
; }; export default App; `,description:"

Customize selection group.

"}},{demo:{id:"components-table-demo-sticky"},previewerProps:{title:"Fixed header and scroll bar with the page",filename:"components/table/demo/sticky.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React, { useState } from 'react'; import { Switch, Table } from 'antd'; const columns = [ { title: 'Full Name', width: 100, dataIndex: 'name', key: 'name', fixed: 'left', }, { title: 'Age', width: 100, dataIndex: 'age', key: 'age', fixed: 'left', }, { title: 'Column 1', dataIndex: 'address', key: '1', width: 150, }, { title: 'Column 2', dataIndex: 'address', key: '2', width: 150, }, { title: 'Column 3', dataIndex: 'address', key: '3', width: 150, }, { title: 'Column 4', dataIndex: 'address', key: '4', width: 150, }, { title: 'Column 5', dataIndex: 'address', key: '5', width: 150, }, { title: 'Column 6', dataIndex: 'address', key: '6', width: 150, }, { title: 'Column 7', dataIndex: 'address', key: '7', width: 150, }, { title: 'Column 8', dataIndex: 'address', key: '8', }, { title: 'Action', key: 'operation', fixed: 'right', width: 100, render: () => action, }, ]; const data = []; for (let i = 0; i < 100; i++) { data.push({ key: i, name: \`Edward \${i}\`, age: 32, address: \`London Park no. \${i}\`, }); } const App = () => { const [fixedTop, setFixedTop] = useState(false); return (
( { setFixedTop(!fixedTop); }} /> Scroll Context Fix Right )} sticky /> ); }; export default App; `,description:"

For long table\uFF0Cneed to scroll to view the header and scroll bar\uFF0Cthen you can now set the fixed header and scroll bar to follow the page.

"}},{demo:{id:"components-table-demo-dynamic-settings"},previewerProps:{title:"Dynamic Settings",filename:"components/table/demo/dynamic-settings.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import React, { useState } from 'react'; import { DownOutlined } from '@ant-design/icons'; import { Form, Radio, Space, Switch, Table } from 'antd'; const columns = [ { title: 'Name', dataIndex: 'name', }, { title: 'Age', dataIndex: 'age', sorter: (a, b) => a.age - b.age, }, { title: 'Address', dataIndex: 'address', filters: [ { text: 'London', value: 'London', }, { text: 'New York', value: 'New York', }, ], onFilter: (value, record) => record.address.indexOf(value) === 0, }, { title: 'Action', key: 'action', sorter: true, render: () => ( Delete More actions ), }, ]; const data = []; for (let i = 1; i <= 10; i++) { data.push({ key: i, name: 'John Brown', age: Number(\`\${i}2\`), address: \`New York No. \${i} Lake Park\`, description: \`My name is John Brown, I am \${i}2 years old, living in New York No. \${i} Lake Park.\`, }); } const defaultExpandable = { expandedRowRender: (record) =>

{record.description}

, }; const defaultTitle = () => 'Here is title'; const defaultFooter = () => 'Here is footer'; const App = () => { const [bordered, setBordered] = useState(false); const [loading, setLoading] = useState(false); const [size, setSize] = useState('large'); const [expandable, setExpandable] = useState(defaultExpandable); const [showTitle, setShowTitle] = useState(false); const [showHeader, setShowHeader] = useState(true); const [showfooter, setShowFooter] = useState(true); const [rowSelection, setRowSelection] = useState({}); const [hasData, setHasData] = useState(true); const [tableLayout, setTableLayout] = useState(); const [top, setTop] = useState('none'); const [bottom, setBottom] = useState('bottomRight'); const [ellipsis, setEllipsis] = useState(false); const [yScroll, setYScroll] = useState(false); const [xScroll, setXScroll] = useState(); const handleBorderChange = (enable) => { setBordered(enable); }; const handleLoadingChange = (enable) => { setLoading(enable); }; const handleSizeChange = (e) => { setSize(e.target.value); }; const handleTableLayoutChange = (e) => { setTableLayout(e.target.value); }; const handleExpandChange = (enable) => { setExpandable(enable ? defaultExpandable : undefined); }; const handleEllipsisChange = (enable) => { setEllipsis(enable); }; const handleTitleChange = (enable) => { setShowTitle(enable); }; const handleHeaderChange = (enable) => { setShowHeader(enable); }; const handleFooterChange = (enable) => { setShowFooter(enable); }; const handleRowSelectionChange = (enable) => { setRowSelection(enable ? {} : undefined); }; const handleYScrollChange = (enable) => { setYScroll(enable); }; const handleXScrollChange = (e) => { setXScroll(e.target.value); }; const handleDataChange = (newHasData) => { setHasData(newHasData); }; const scroll = {}; if (yScroll) { scroll.y = 240; } if (xScroll) { scroll.x = '100vw'; } const tableColumns = columns.map((item) => ({ ...item, ellipsis, })); if (xScroll === 'fixed') { tableColumns[0].fixed = true; tableColumns[tableColumns.length - 1].fixed = 'right'; } const tableProps = { bordered, loading, size, expandable, title: showTitle ? defaultTitle : undefined, showHeader, footer: showfooter ? defaultFooter : undefined, rowSelection, scroll, tableLayout, }; return ( <> Large Middle Small Unset Scroll Fixed Columns Unset Fixed { setTop(e.target.value); }} > TopLeft TopCenter TopRight None { setBottom(e.target.value); }} > BottomLeft BottomCenter BottomRight None
); }; export default App; `,description:"

Select different settings to see the result.

",style:`.components-table-demo-control-bar .ant-form-item { margin-right: 16px !important; margin-bottom: 8px !important; }`}},{demo:{id:"components-table-demo-selections-debug"},previewerProps:{debug:!0,title:"selections with icon",filename:"components/table/demo/selections-debug.tsx",pkgDependencyList:{"@ant-design/colors":"^7.0.0","@ant-design/cssinjs":"^1.10.1","@ant-design/icons":"^5.1.0","@ant-design/react-slick":"~1.0.0","@babel/runtime":"^7.18.3","@ctrl/tinycolor":"^3.6.0","@rc-component/color-picker":"~1.4.0","@rc-component/mutate-observer":"^1.0.0","@rc-component/tour":"~1.8.0","@rc-component/trigger":"^1.13.0",classnames:"^2.2.6","copy-to-clipboard":"^3.2.0",dayjs:"^1.11.1","qrcode.react":"^3.1.0","rc-cascader":"~3.12.0","rc-checkbox":"~3.1.0","rc-collapse":"~3.7.0","rc-dialog":"~9.1.0","rc-drawer":"~6.2.0","rc-dropdown":"~4.1.0","rc-field-form":"~1.34.0","rc-image":"~7.0.0","rc-input":"~1.1.0","rc-input-number":"~8.0.2","rc-mentions":"~2.5.0","rc-menu":"~9.10.0","rc-motion":"^2.7.3","rc-notification":"~5.0.4","rc-pagination":"~3.5.0","rc-picker":"~3.10.0","rc-progress":"~3.4.1","rc-rate":"~2.12.0","rc-resize-observer":"^1.2.0","rc-segmented":"~2.2.0","rc-select":"~14.5.0","rc-slider":"~10.1.0","rc-steps":"~6.0.0","rc-switch":"~4.1.0","rc-table":"~7.32.1","rc-tabs":"~12.9.0","rc-textarea":"~1.3.2","rc-tooltip":"~6.0.0","rc-tree":"~5.7.6","rc-tree-select":"~5.9.0","rc-upload":"~4.3.0","rc-util":"^5.32.0","scroll-into-view-if-needed":"^3.0.3","throttle-debounce":"^5.0.0"},jsx:`import { Table } from 'antd'; import React from 'react'; const columns = [ { title: 'Name', dataIndex: 'name', }, { title: 'Age', dataIndex: 'age', }, { title: 'Address', dataIndex: 'address', }, ]; const data = [ { key: '1', name: 'John Brown', age: 32, address: 'New York No. 1 Lake Park', }, { key: '2', name: 'Jim Green', age: 42, address: 'London No. 1 Lake Park', }, { key: '3', name: 'Joe Black', age: 32, address: 'Sydney No. 1 Lake Park', }, ]; const App = () => (
); export default App; `,description:"

debug use.

"}}]}),(0,e.tZ)("div",{className:"markdown"},(0,e.tZ)("h2",{id:"api"},(0,e.tZ)(t.Z,{"aria-hidden":"true",tabIndex:"-1",href:"#api",sourceType:"a"},(0,e.tZ)("span",{className:"icon icon-link"})),"API"),(0,e.tZ)("h3",{id:"table"},(0,e.tZ)(t.Z,{"aria-hidden":"true",tabIndex:"-1",href:"#table",sourceType:"a"},(0,e.tZ)("span",{className:"icon icon-link"})),"Table"),(0,e.tZ)(a.Z,{className:"component-api-table"},(0,e.tZ)("thead",null,(0,e.tZ)("tr",null,(0,e.tZ)("th",null,n[10].value),(0,e.tZ)("th",null,n[11].value),(0,e.tZ)("th",null,n[12].value),(0,e.tZ)("th",null,n[13].value),(0,e.tZ)("th",null,n[14].value))),(0,e.tZ)("tbody",null,(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[15].value),(0,e.tZ)("td",null,n[16].value),(0,e.tZ)("td",null,n[17].value),(0,e.tZ)("td",null,n[18].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[19].value),(0,e.tZ)("td",null,n[20].value),(0,e.tZ)("td",null,(0,e.tZ)(t.Z,{to:"#column",sourceType:"Link"},n[21].value),n[22].value),(0,e.tZ)("td",null,n[23].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[24].value),(0,e.tZ)("td",null,n[25].value),(0,e.tZ)("td",null,(0,e.tZ)(t.Z,{href:"https://github.com/react-component/table/blob/75ee0064e54a4b3215694505870c9d6c817e9e4a/src/interface.ts#L129",sourceType:"a"},n[26].value)),(0,e.tZ)("td",null,n[27].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[28].value),(0,e.tZ)("td",null,n[29].value),(0,e.tZ)("td",null,n[30].value),(0,e.tZ)("td",null,n[31].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[32].value),(0,e.tZ)("td",null,n[33].value),(0,e.tZ)("td",null,(0,e.tZ)(t.Z,{to:"#expandable",sourceType:"Link"},n[34].value)),(0,e.tZ)("td",null,n[35].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[36].value),(0,e.tZ)("td",null,n[37].value),(0,e.tZ)("td",null,n[38].value),(0,e.tZ)("td",null,n[39].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[40].value),(0,e.tZ)("td",null,n[41].value),(0,e.tZ)("td",null,n[42].value),(0,e.tZ)("td",null,n[43].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[44].value),(0,e.tZ)("td",null,n[45].value),(0,e.tZ)("td",null,n[46].value,(0,e.tZ)(t.Z,{to:"/components/spin/#api",sourceType:"Link"},n[47].value)),(0,e.tZ)("td",null,n[48].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[49].value),(0,e.tZ)("td",null,n[50].value),(0,e.tZ)("td",null,n[51].value),(0,e.tZ)("td",null,(0,e.tZ)(t.Z,{href:"https://github.com/ant-design/ant-design/blob/6dae4a7e18ad1ba193aedd5ab6867e1d823e2aa4/components/locale/en_US.tsx#L19-L37",sourceType:"a"},n[52].value)),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[53].value),(0,e.tZ)("td",null,n[54].value,(0,e.tZ)(t.Z,{to:"#pagination",sourceType:"Link"},n[55].value),n[56].value,(0,e.tZ)(t.Z,{to:"/components/pagination/",sourceType:"Link"},(0,e.tZ)("code",null,n[57].value)),n[58].value,(0,e.tZ)("code",null,n[59].value)),(0,e.tZ)("td",null,n[60].value,(0,e.tZ)("code",null,n[61].value)),(0,e.tZ)("td",null,n[62].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[63].value),(0,e.tZ)("td",null,n[64].value),(0,e.tZ)("td",null,n[65].value),(0,e.tZ)("td",null,n[66].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[67].value),(0,e.tZ)("td",null,n[68].value),(0,e.tZ)("td",null,n[69].value),(0,e.tZ)("td",null,(0,e.tZ)("code",null,n[70].value)),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[71].value),(0,e.tZ)("td",null,n[72].value,(0,e.tZ)(t.Z,{to:"#rowselection",sourceType:"Link"},n[73].value)),(0,e.tZ)("td",null,n[74].value),(0,e.tZ)("td",null,n[75].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[76].value),(0,e.tZ)("td",null,n[77].value,(0,e.tZ)(t.Z,{to:"#scroll",sourceType:"Link"},n[78].value)),(0,e.tZ)("td",null,n[79].value),(0,e.tZ)("td",null,n[80].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[81].value),(0,e.tZ)("td",null,n[82].value),(0,e.tZ)("td",null,n[83].value),(0,e.tZ)("td",null,n[84].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[85].value),(0,e.tZ)("td",null,n[86].value),(0,e.tZ)("td",null,n[87].value,(0,e.tZ)(t.Z,{to:"/components/tooltip/#api",sourceType:"Link"},n[88].value)),(0,e.tZ)("td",null,n[89].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[90].value),(0,e.tZ)("td",null,n[91].value),(0,e.tZ)("td",null,(0,e.tZ)("code",null,n[92].value),n[93].value,(0,e.tZ)("code",null,n[94].value),n[95].value,(0,e.tZ)("code",null,n[96].value)),(0,e.tZ)("td",null,(0,e.tZ)("code",null,n[97].value)),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[98].value),(0,e.tZ)("td",null,n[99].value,(0,e.tZ)("code",null,n[100].value),n[101].value,(0,e.tZ)("code",null,n[102].value)),(0,e.tZ)("td",null,n[103].value),(0,e.tZ)("td",null,n[104].value,(0,e.tZ)("code",null,n[105].value),n[106].value,(0,e.tZ)("code",null,n[107].value),n[108].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[109].value),(0,e.tZ)("td",null,n[110].value),(0,e.tZ)("td",null,n[111].value,(0,e.tZ)("code",null,n[112].value)),(0,e.tZ)("td",null,n[113].value),(0,e.tZ)("td",null,n[114].value)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[115].value),(0,e.tZ)("td",null,n[116].value),(0,e.tZ)("td",null,n[117].value),(0,e.tZ)("td",null,n[118].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[119].value),(0,e.tZ)("td",null,n[120].value,(0,e.tZ)(t.Z,{href:"https://developer.mozilla.org/en-US/docs/Web/CSS/table-layout",sourceType:"a"},n[121].value),n[122].value),(0,e.tZ)("td",null,n[123].value,(0,e.tZ)("code",null,n[124].value),n[125].value,(0,e.tZ)("code",null,n[126].value)),(0,e.tZ)("td",null,n[127].value,(0,e.tZ)("hr",null),(0,e.tZ)("code",null,n[128].value),n[129].value,(0,e.tZ)("code",null,n[130].value)),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[131].value),(0,e.tZ)("td",null,n[132].value),(0,e.tZ)("td",null,n[133].value),(0,e.tZ)("td",null,n[134].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[135].value),(0,e.tZ)("td",null,n[136].value),(0,e.tZ)("td",null,n[137].value,(0,e.tZ)("code",null,n[138].value),n[139].value,(0,e.tZ)("code",null,n[140].value),n[141].value,(0,e.tZ)("code",null,n[142].value),n[143].value),(0,e.tZ)("td",null,n[144].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[145].value),(0,e.tZ)("td",null,n[146].value),(0,e.tZ)("td",null,n[147].value),(0,e.tZ)("td",null,n[148].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[149].value),(0,e.tZ)("td",null,n[150].value),(0,e.tZ)("td",null,n[151].value),(0,e.tZ)("td",null,n[152].value),(0,e.tZ)("td",null)))),(0,e.tZ)("h4",{id:"onrow-usage"},(0,e.tZ)(t.Z,{"aria-hidden":"true",tabIndex:"-1",href:"#onrow-usage",sourceType:"a"},(0,e.tZ)("span",{className:"icon icon-link"})),"onRow usage"),(0,e.tZ)("p",null,n[153].value,(0,e.tZ)("code",null,n[154].value),n[155].value,(0,e.tZ)("code",null,n[156].value),n[157].value,(0,e.tZ)("code",null,n[158].value),n[159].value,(0,e.tZ)("code",null,n[160].value)),(0,e.tZ)(o.Z,{lang:"jsx"},n[161].value),(0,e.tZ)("h3",{id:"column"},(0,e.tZ)(t.Z,{"aria-hidden":"true",tabIndex:"-1",href:"#column",sourceType:"a"},(0,e.tZ)("span",{className:"icon icon-link"})),"Column"),(0,e.tZ)("p",null,n[162].value,(0,e.tZ)("code",null,n[163].value),n[164].value),(0,e.tZ)(a.Z,{className:"component-api-table"},(0,e.tZ)("thead",null,(0,e.tZ)("tr",null,(0,e.tZ)("th",null,n[165].value),(0,e.tZ)("th",null,n[166].value),(0,e.tZ)("th",null,n[167].value),(0,e.tZ)("th",null,n[168].value),(0,e.tZ)("th",null,n[169].value))),(0,e.tZ)("tbody",null,(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[170].value),(0,e.tZ)("td",null,n[171].value),(0,e.tZ)("td",null,(0,e.tZ)("code",null,n[172].value),n[173].value,(0,e.tZ)("code",null,n[174].value),n[175].value,(0,e.tZ)("code",null,n[176].value)),(0,e.tZ)("td",null,(0,e.tZ)("code",null,n[177].value)),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[178].value),(0,e.tZ)("td",null,n[179].value),(0,e.tZ)("td",null,n[180].value),(0,e.tZ)("td",null,n[181].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[182].value),(0,e.tZ)("td",null,n[183].value),(0,e.tZ)("td",null,n[184].value),(0,e.tZ)("td",null,n[185].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[186].value),(0,e.tZ)("td",null,n[187].value),(0,e.tZ)("td",null,n[188].value),(0,e.tZ)("td",null,n[189].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[190].value),(0,e.tZ)("td",null,n[191].value),(0,e.tZ)("td",null,n[192].value),(0,e.tZ)("td",null,n[193].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[194].value),(0,e.tZ)("td",null,n[195].value),(0,e.tZ)("td",null,n[196].value),(0,e.tZ)("td",null,n[197].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[198].value),(0,e.tZ)("td",null,n[199].value),(0,e.tZ)("td",null,(0,e.tZ)("code",null,n[200].value),n[201].value,(0,e.tZ)("code",null,n[202].value)),(0,e.tZ)("td",null,n[203].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[204].value),(0,e.tZ)("td",null,n[205].value,(0,e.tZ)("br",null),n[206].value,(0,e.tZ)("code",null,n[207].value),n[208].value,(0,e.tZ)("code",null,n[209].value),n[210].value,(0,e.tZ)("code",null,n[211].value),n[212].value,(0,e.tZ)("code",null,n[213].value)),(0,e.tZ)("td",null,n[214].value),(0,e.tZ)("td",null,n[215].value),(0,e.tZ)("td",null,n[216].value)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[217].value),(0,e.tZ)("td",null,n[218].value),(0,e.tZ)("td",null,n[219].value,(0,e.tZ)(t.Z,{href:"https://github.com/ant-design/ant-design/blob/ecc54dda839619e921c0ace530408871f0281c2a/components/table/interface.tsx#L79",sourceType:"a"},n[220].value),n[221].value),(0,e.tZ)("td",null,n[222].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[223].value),(0,e.tZ)("td",null,n[224].value,(0,e.tZ)("code",null,n[225].value),n[226].value),(0,e.tZ)("td",null,n[227].value),(0,e.tZ)("td",null,n[228].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[229].value),(0,e.tZ)("td",null,n[230].value,(0,e.tZ)("code",null,n[231].value),n[232].value),(0,e.tZ)("td",null,n[233].value),(0,e.tZ)("td",null,n[234].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[235].value),(0,e.tZ)("td",null,n[236].value),(0,e.tZ)("td",null,n[237].value),(0,e.tZ)("td",null,n[238].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[239].value),(0,e.tZ)("td",null,n[240].value),(0,e.tZ)("td",null,n[241].value),(0,e.tZ)("td",null,n[242].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[243].value),(0,e.tZ)("td",null,n[244].value),(0,e.tZ)("td",null,n[245].value),(0,e.tZ)("td",null,n[246].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[247].value),(0,e.tZ)("td",null,n[248].value),(0,e.tZ)("td",null,n[249].value),(0,e.tZ)("td",null,n[250].value),(0,e.tZ)("td",null,n[251].value)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[252].value),(0,e.tZ)("td",null,n[253].value),(0,e.tZ)("td",null,n[254].value),(0,e.tZ)("td",null,n[255].value),(0,e.tZ)("td",null,n[256].value)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[257].value),(0,e.tZ)("td",null,n[258].value),(0,e.tZ)("td",null,n[259].value),(0,e.tZ)("td",null,n[260].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[261].value),(0,e.tZ)("td",null,n[262].value,(0,e.tZ)("code",null,n[263].value),n[264].value,(0,e.tZ)("code",null,n[265].value),n[266].value,(0,e.tZ)("code",null,n[267].value)),(0,e.tZ)("td",null,n[268].value),(0,e.tZ)("td",null,n[269].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[270].value),(0,e.tZ)("td",null,n[271].value,(0,e.tZ)("code",null,n[272].value)),(0,e.tZ)("td",null,n[273].value),(0,e.tZ)("td",null,n[274].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[275].value),(0,e.tZ)("td",null,n[276].value),(0,e.tZ)("td",null,n[277].value),(0,e.tZ)("td",null,n[278].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[279].value),(0,e.tZ)("td",null,n[280].value),(0,e.tZ)("td",null,(0,e.tZ)(t.Z,{href:"https://github.com/ant-design/ant-design/blob/015109b42b85c63146371b4e32b883cf97b088e8/components/_util/responsiveObserve.ts#L1",sourceType:"a"},n[281].value),n[282].value),(0,e.tZ)("td",null,n[283].value),(0,e.tZ)("td",null,n[284].value)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[285].value),(0,e.tZ)("td",null,n[286].value),(0,e.tZ)("td",null,(0,e.tZ)("code",null,n[287].value),n[288].value,(0,e.tZ)("code",null,n[289].value)),(0,e.tZ)("td",null,n[290].value),(0,e.tZ)("td",null,n[291].value)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[292].value),(0,e.tZ)("td",null,n[293].value),(0,e.tZ)("td",null,n[294].value),(0,e.tZ)("td",null,n[295].value),(0,e.tZ)("td",null,n[296].value)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[297].value),(0,e.tZ)("td",null,n[298].value,(0,e.tZ)("code",null,n[299].value),n[300].value),(0,e.tZ)("td",null,n[301].value,(0,e.tZ)(t.Z,{to:"/components/tooltip/",sourceType:"Link"},n[302].value)),(0,e.tZ)("td",null,n[303].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[304].value),(0,e.tZ)("td",null,n[305].value,(0,e.tZ)("code",null,n[306].value),n[307].value,(0,e.tZ)("code",null,n[308].value),n[309].value,(0,e.tZ)("code",null,n[310].value),n[311].value,(0,e.tZ)("code",null,n[312].value)),(0,e.tZ)("td",null,n[313].value),(0,e.tZ)("td",null,n[314].value,(0,e.tZ)("code",null,n[315].value),n[316].value,(0,e.tZ)("code",null,n[317].value),n[318].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[319].value),(0,e.tZ)("td",null,n[320].value,(0,e.tZ)(t.Z,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort",sourceType:"a"},n[321].value),n[322].value,(0,e.tZ)("code",null,n[323].value)),(0,e.tZ)("td",null,n[324].value),(0,e.tZ)("td",null,n[325].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[326].value),(0,e.tZ)("td",null,n[327].value,(0,e.tZ)("code",null,n[328].value),n[329].value,(0,e.tZ)("code",null,n[330].value),n[331].value,(0,e.tZ)("code",null,n[332].value)),(0,e.tZ)("td",null,(0,e.tZ)("code",null,n[333].value),n[334].value,(0,e.tZ)("code",null,n[335].value),n[336].value),(0,e.tZ)("td",null,n[337].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[338].value),(0,e.tZ)("td",null,n[339].value),(0,e.tZ)("td",null,n[340].value),(0,e.tZ)("td",null,n[341].value),(0,e.tZ)("td",null,n[342].value)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[343].value),(0,e.tZ)("td",null,n[344].value),(0,e.tZ)("td",null,n[345].value),(0,e.tZ)("td",null,n[346].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[347].value),(0,e.tZ)("td",null,n[348].value,(0,e.tZ)(t.Z,{href:"https://github.com/ant-design/ant-design/issues/13825#issuecomment-449889241",sourceType:"a"},n[349].value),n[350].value),(0,e.tZ)("td",null,n[351].value),(0,e.tZ)("td",null,n[352].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[353].value),(0,e.tZ)("td",null,n[354].value),(0,e.tZ)("td",null,n[355].value),(0,e.tZ)("td",null,n[356].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[357].value),(0,e.tZ)("td",null,n[358].value),(0,e.tZ)("td",null,n[359].value),(0,e.tZ)("td",null,n[360].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[361].value),(0,e.tZ)("td",null,n[362].value,(0,e.tZ)("code",null,n[363].value),n[364].value),(0,e.tZ)("td",null,n[365].value),(0,e.tZ)("td",null,n[366].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[367].value),(0,e.tZ)("td",null,n[368].value),(0,e.tZ)("td",null,n[369].value),(0,e.tZ)("td",null,n[370].value),(0,e.tZ)("td",null)))),(0,e.tZ)("h3",{id:"columngroup"},(0,e.tZ)(t.Z,{"aria-hidden":"true",tabIndex:"-1",href:"#columngroup",sourceType:"a"},(0,e.tZ)("span",{className:"icon icon-link"})),"ColumnGroup"),(0,e.tZ)(a.Z,{className:"component-api-table"},(0,e.tZ)("thead",null,(0,e.tZ)("tr",null,(0,e.tZ)("th",null,n[371].value),(0,e.tZ)("th",null,n[372].value),(0,e.tZ)("th",null,n[373].value),(0,e.tZ)("th",null,n[374].value))),(0,e.tZ)("tbody",null,(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[375].value),(0,e.tZ)("td",null,n[376].value),(0,e.tZ)("td",null,n[377].value),(0,e.tZ)("td",null,n[378].value)))),(0,e.tZ)("h3",{id:"pagination"},(0,e.tZ)(t.Z,{"aria-hidden":"true",tabIndex:"-1",href:"#pagination",sourceType:"a"},(0,e.tZ)("span",{className:"icon icon-link"})),"pagination"),(0,e.tZ)("p",null,n[379].value),(0,e.tZ)(a.Z,{className:"component-api-table"},(0,e.tZ)("thead",null,(0,e.tZ)("tr",null,(0,e.tZ)("th",null,n[380].value),(0,e.tZ)("th",null,n[381].value),(0,e.tZ)("th",null,n[382].value),(0,e.tZ)("th",null,n[383].value))),(0,e.tZ)("tbody",null,(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[384].value),(0,e.tZ)("td",null,n[385].value,(0,e.tZ)("code",null,n[386].value),n[387].value,(0,e.tZ)("code",null,n[388].value),n[389].value,(0,e.tZ)("code",null,n[390].value),n[391].value,(0,e.tZ)("code",null,n[392].value),n[393].value,(0,e.tZ)("code",null,n[394].value),n[395].value,(0,e.tZ)("code",null,n[396].value),n[397].value,(0,e.tZ)("code",null,n[398].value)),(0,e.tZ)("td",null,n[399].value),(0,e.tZ)("td",null,n[400].value,(0,e.tZ)("code",null,n[401].value),n[402].value)))),(0,e.tZ)("p",null,n[403].value,(0,e.tZ)(t.Z,{to:"/components/pagination/",sourceType:"Link"},(0,e.tZ)("code",null,n[404].value)),n[405].value),(0,e.tZ)("h3",{id:"expandable"},(0,e.tZ)(t.Z,{"aria-hidden":"true",tabIndex:"-1",href:"#expandable",sourceType:"a"},(0,e.tZ)("span",{className:"icon icon-link"})),"expandable"),(0,e.tZ)("p",null,n[406].value),(0,e.tZ)(a.Z,{className:"component-api-table"},(0,e.tZ)("thead",null,(0,e.tZ)("tr",null,(0,e.tZ)("th",null,n[407].value),(0,e.tZ)("th",null,n[408].value),(0,e.tZ)("th",null,n[409].value),(0,e.tZ)("th",null,n[410].value),(0,e.tZ)("th",null,n[411].value))),(0,e.tZ)("tbody",null,(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[412].value),(0,e.tZ)("td",null,n[413].value),(0,e.tZ)("td",null,n[414].value),(0,e.tZ)("td",null,n[415].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[416].value),(0,e.tZ)("td",null,n[417].value),(0,e.tZ)("td",null,n[418].value),(0,e.tZ)("td",null,n[419].value),(0,e.tZ)("td",null,n[420].value)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[421].value),(0,e.tZ)("td",null,n[422].value),(0,e.tZ)("td",null,n[423].value),(0,e.tZ)("td",null,n[424].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[425].value),(0,e.tZ)("td",null,n[426].value),(0,e.tZ)("td",null,n[427].value),(0,e.tZ)("td",null,n[428].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[429].value),(0,e.tZ)("td",null,n[430].value),(0,e.tZ)("td",null,n[431].value),(0,e.tZ)("td",null,n[432].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[433].value),(0,e.tZ)("td",null,n[434].value),(0,e.tZ)("td",null,n[435].value),(0,e.tZ)("td",null,n[436].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[437].value),(0,e.tZ)("td",null,n[438].value),(0,e.tZ)("td",null,n[439].value),(0,e.tZ)("td",null,n[440].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[441].value),(0,e.tZ)("td",null,n[442].value),(0,e.tZ)("td",null,n[443].value),(0,e.tZ)("td",null,n[444].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[445].value),(0,e.tZ)("td",null,n[446].value,(0,e.tZ)(t.Z,{href:"https://codesandbox.io/s/fervent-bird-nuzpr",sourceType:"a"},n[447].value)),(0,e.tZ)("td",null,n[448].value),(0,e.tZ)("td",null,n[449].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[450].value),(0,e.tZ)("td",null,n[451].value),(0,e.tZ)("td",null,n[452].value),(0,e.tZ)("td",null,n[453].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[454].value),(0,e.tZ)("td",null,n[455].value,(0,e.tZ)("code",null,n[456].value),n[457].value,(0,e.tZ)("code",null,n[458].value)),(0,e.tZ)("td",null,n[459].value),(0,e.tZ)("td",null,n[460].value),(0,e.tZ)("td",null,n[461].value)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[462].value),(0,e.tZ)("td",null,n[463].value),(0,e.tZ)("td",null,n[464].value),(0,e.tZ)("td",null,n[465].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[466].value),(0,e.tZ)("td",null,n[467].value),(0,e.tZ)("td",null,n[468].value),(0,e.tZ)("td",null,n[469].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[470].value),(0,e.tZ)("td",null,n[471].value),(0,e.tZ)("td",null,n[472].value),(0,e.tZ)("td",null,n[473].value),(0,e.tZ)("td",null,n[474].value)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[475].value),(0,e.tZ)("td",null,n[476].value),(0,e.tZ)("td",null,n[477].value),(0,e.tZ)("td",null,n[478].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[479].value),(0,e.tZ)("td",null,n[480].value),(0,e.tZ)("td",null,n[481].value),(0,e.tZ)("td",null,n[482].value),(0,e.tZ)("td",null)))),(0,e.tZ)("h3",{id:"rowselection"},(0,e.tZ)(t.Z,{"aria-hidden":"true",tabIndex:"-1",href:"#rowselection",sourceType:"a"},(0,e.tZ)("span",{className:"icon icon-link"})),"rowSelection"),(0,e.tZ)("p",null,n[483].value),(0,e.tZ)(a.Z,{className:"component-api-table"},(0,e.tZ)("thead",null,(0,e.tZ)("tr",null,(0,e.tZ)("th",null,n[484].value),(0,e.tZ)("th",null,n[485].value),(0,e.tZ)("th",null,n[486].value),(0,e.tZ)("th",null,n[487].value),(0,e.tZ)("th",null,n[488].value))),(0,e.tZ)("tbody",null,(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[489].value),(0,e.tZ)("td",null,n[490].value),(0,e.tZ)("td",null,n[491].value),(0,e.tZ)("td",null,n[492].value),(0,e.tZ)("td",null,n[493].value)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[494].value),(0,e.tZ)("td",null,n[495].value),(0,e.tZ)("td",null,n[496].value),(0,e.tZ)("td",null,n[497].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[498].value),(0,e.tZ)("td",null,n[499].value),(0,e.tZ)("td",null,n[500].value),(0,e.tZ)("td",null,(0,e.tZ)("code",null,n[501].value)),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[502].value),(0,e.tZ)("td",null,n[503].value),(0,e.tZ)("td",null,n[504].value),(0,e.tZ)("td",null,n[505].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[506].value),(0,e.tZ)("td",null,n[507].value),(0,e.tZ)("td",null,n[508].value),(0,e.tZ)("td",null,n[509].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[510].value),(0,e.tZ)("td",null,n[511].value),(0,e.tZ)("td",null,n[512].value),(0,e.tZ)("td",null,n[513].value),(0,e.tZ)("td",null,n[514].value)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[515].value),(0,e.tZ)("td",null,n[516].value,(0,e.tZ)("code",null,n[517].value),n[518].value,(0,e.tZ)("code",null,n[519].value)),(0,e.tZ)("td",null,n[520].value),(0,e.tZ)("td",null,n[521].value),(0,e.tZ)("td",null,n[522].value)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[523].value),(0,e.tZ)("td",null,n[524].value,(0,e.tZ)("code",null,n[525].value),n[526].value),(0,e.tZ)("td",null,n[527].value),(0,e.tZ)("td",null,n[528].value),(0,e.tZ)("td",null,n[529].value)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[530].value),(0,e.tZ)("td",null,n[531].value),(0,e.tZ)("td",null,n[532].value),(0,e.tZ)("td",null,n[533].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[534].value),(0,e.tZ)("td",null,n[535].value,(0,e.tZ)(t.Z,{to:"#selection",sourceType:"Link"},n[536].value),n[537].value,(0,e.tZ)("code",null,n[538].value)),(0,e.tZ)("td",null,n[539].value),(0,e.tZ)("td",null,n[540].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[541].value),(0,e.tZ)("td",null,(0,e.tZ)("code",null,n[542].value),n[543].value,(0,e.tZ)("code",null,n[544].value)),(0,e.tZ)("td",null,(0,e.tZ)("code",null,n[545].value),n[546].value,(0,e.tZ)("code",null,n[547].value)),(0,e.tZ)("td",null,(0,e.tZ)("code",null,n[548].value)),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[549].value),(0,e.tZ)("td",null,n[550].value,(0,e.tZ)("code",null,n[551].value),n[552].value),(0,e.tZ)("td",null,n[553].value),(0,e.tZ)("td",null,n[554].value),(0,e.tZ)("td",null,n[555].value)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[556].value),(0,e.tZ)("td",null,n[557].value),(0,e.tZ)("td",null,n[558].value),(0,e.tZ)("td",null,n[559].value),(0,e.tZ)("td",null,(0,e.tZ)("code",null,n[560].value),n[561].value)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[562].value),(0,e.tZ)("td",null,n[563].value),(0,e.tZ)("td",null,n[564].value),(0,e.tZ)("td",null,n[565].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[566].value),(0,e.tZ)("td",null,n[567].value),(0,e.tZ)("td",null,n[568].value),(0,e.tZ)("td",null,n[569].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[570].value),(0,e.tZ)("td",null,n[571].value),(0,e.tZ)("td",null,n[572].value),(0,e.tZ)("td",null,n[573].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[574].value),(0,e.tZ)("td",null,n[575].value),(0,e.tZ)("td",null,n[576].value),(0,e.tZ)("td",null,n[577].value),(0,e.tZ)("td",null)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[578].value),(0,e.tZ)("td",null,n[579].value),(0,e.tZ)("td",null,n[580].value),(0,e.tZ)("td",null,n[581].value),(0,e.tZ)("td",null)))),(0,e.tZ)("h3",{id:"scroll"},(0,e.tZ)(t.Z,{"aria-hidden":"true",tabIndex:"-1",href:"#scroll",sourceType:"a"},(0,e.tZ)("span",{className:"icon icon-link"})),"scroll"),(0,e.tZ)(a.Z,{className:"component-api-table"},(0,e.tZ)("thead",null,(0,e.tZ)("tr",null,(0,e.tZ)("th",null,n[582].value),(0,e.tZ)("th",null,n[583].value),(0,e.tZ)("th",null,n[584].value),(0,e.tZ)("th",null,n[585].value))),(0,e.tZ)("tbody",null,(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[586].value),(0,e.tZ)("td",null,n[587].value),(0,e.tZ)("td",null,n[588].value),(0,e.tZ)("td",null,n[589].value)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[590].value),(0,e.tZ)("td",null,n[591].value,(0,e.tZ)(t.Z,{href:"https://developer.mozilla.org/zh-CN/docs/Web/CSS/width#max-content",sourceType:"a"},n[592].value)),(0,e.tZ)("td",null,n[593].value),(0,e.tZ)("td",null,n[594].value)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[595].value),(0,e.tZ)("td",null,n[596].value),(0,e.tZ)("td",null,n[597].value),(0,e.tZ)("td",null,n[598].value)))),(0,e.tZ)("h3",{id:"selection"},(0,e.tZ)(t.Z,{"aria-hidden":"true",tabIndex:"-1",href:"#selection",sourceType:"a"},(0,e.tZ)("span",{className:"icon icon-link"})),"selection"),(0,e.tZ)(a.Z,{className:"component-api-table"},(0,e.tZ)("thead",null,(0,e.tZ)("tr",null,(0,e.tZ)("th",null,n[599].value),(0,e.tZ)("th",null,n[600].value),(0,e.tZ)("th",null,n[601].value),(0,e.tZ)("th",null,n[602].value))),(0,e.tZ)("tbody",null,(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[603].value),(0,e.tZ)("td",null,n[604].value),(0,e.tZ)("td",null,n[605].value),(0,e.tZ)("td",null,n[606].value)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[607].value),(0,e.tZ)("td",null,n[608].value),(0,e.tZ)("td",null,n[609].value),(0,e.tZ)("td",null,n[610].value)),(0,e.tZ)("tr",null,(0,e.tZ)("td",null,n[611].value),(0,e.tZ)("td",null,n[612].value),(0,e.tZ)("td",null,n[613].value),(0,e.tZ)("td",null,n[614].value)))),(0,e.tZ)("h2",{id:"using-in-typescript"},(0,e.tZ)(t.Z,{"aria-hidden":"true",tabIndex:"-1",href:"#using-in-typescript",sourceType:"a"},(0,e.tZ)("span",{className:"icon icon-link"})),"Using in TypeScript"),(0,e.tZ)(o.Z,{lang:"tsx"},n[615].value),(0,e.tZ)("p",null,n[616].value,(0,e.tZ)(t.Z,{href:"https://codesandbox.io/s/serene-platform-0jo5t",sourceType:"a"},n[617].value),n[618].value),(0,e.tZ)("h2",{id:"design-token"},(0,e.tZ)(t.Z,{"aria-hidden":"true",tabIndex:"-1",href:"#design-token",sourceType:"a"},(0,e.tZ)("span",{className:"icon icon-link"})),"Design Token")),(0,e.tZ)(d.Z,{component:"Table"}),(0,e.tZ)("div",{className:"markdown"},(0,e.tZ)("h2",{id:"note"},(0,e.tZ)(t.Z,{"aria-hidden":"true",tabIndex:"-1",href:"#note",sourceType:"a"},(0,e.tZ)("span",{className:"icon icon-link"})),"Note"),(0,e.tZ)("p",null,n[619].value,(0,e.tZ)(t.Z,{href:"https://facebook.github.io/react/docs/lists-and-keys.html#keys",sourceType:"a"},n[620].value),n[621].value,(0,e.tZ)("code",null,n[622].value),n[623].value,(0,e.tZ)("code",null,n[624].value),n[625].value,(0,e.tZ)("code",null,n[626].value),n[627].value,(0,e.tZ)("code",null,n[628].value),n[629].value),(0,e.tZ)("p",null,(0,e.tZ)("img",{src:"https://os.alipayobjects.com/rmsportal/luLdLvhPOiRpyss.png",alt:"console warning"})),(0,e.tZ)("p",null,n[630].value,(0,e.tZ)("code",null,n[631].value),n[632].value,(0,e.tZ)("code",null,n[633].value),n[634].value),(0,e.tZ)(o.Z,{lang:"jsx"},n[635].value),(0,e.tZ)("h2",{id:"faq"},(0,e.tZ)(t.Z,{"aria-hidden":"true",tabIndex:"-1",href:"#faq",sourceType:"a"},(0,e.tZ)("span",{className:"icon icon-link"})),"FAQ"),(0,e.tZ)("h3",{id:"how-to-hide-pagination-when-single-page-or-no-data"},(0,e.tZ)(t.Z,{"aria-hidden":"true",tabIndex:"-1",href:"#how-to-hide-pagination-when-single-page-or-no-data",sourceType:"a"},(0,e.tZ)("span",{className:"icon icon-link"})),"How to hide pagination when single page or no data?"),(0,e.tZ)("p",null,n[636].value,(0,e.tZ)("code",null,n[637].value),n[638].value,(0,e.tZ)("code",null,n[639].value),n[640].value),(0,e.tZ)("h3",{id:"table-will-return-to-first-page-when-filter-data"},(0,e.tZ)(t.Z,{"aria-hidden":"true",tabIndex:"-1",href:"#table-will-return-to-first-page-when-filter-data",sourceType:"a"},(0,e.tZ)("span",{className:"icon icon-link"})),"Table will return to first page when filter data."),(0,e.tZ)("p",null,n[641].value),(0,e.tZ)("p",null,n[642].value,(0,e.tZ)(t.Z,{href:"https://codesandbox.io/s/yuanchengjiazaishuju-ant-design-demo-7y2uf",sourceType:"a"},n[643].value),n[644].value),(0,e.tZ)("p",null,n[645].value),(0,e.tZ)("h3",{id:"why-table-pagination-show-size-changer"},(0,e.tZ)(t.Z,{"aria-hidden":"true",tabIndex:"-1",href:"#why-table-pagination-show-size-changer",sourceType:"a"},(0,e.tZ)("span",{className:"icon icon-link"})),"Why Table pagination show size changer?"),(0,e.tZ)("p",null,n[646].value,(0,e.tZ)("code",null,n[647].value),n[648].value,(0,e.tZ)("code",null,n[649].value),n[650].value,(0,e.tZ)("code",null,n[651].value),n[652].value),(0,e.tZ)("h3",{id:"why-table-fully-render-when-state-change"},(0,e.tZ)(t.Z,{"aria-hidden":"true",tabIndex:"-1",href:"#why-table-fully-render-when-state-change",sourceType:"a"},(0,e.tZ)("span",{className:"icon icon-link"})),"Why Table fully render when state change?"),(0,e.tZ)("p",null,n[653].value,(0,e.tZ)("code",null,n[654].value),n[655].value,(0,e.tZ)("code",null,n[656].value),n[657].value),(0,e.tZ)("h3",{id:"how-to-handle-fixed-column-display-over-the-mask-layout"},(0,e.tZ)(t.Z,{"aria-hidden":"true",tabIndex:"-1",href:"#how-to-handle-fixed-column-display-over-the-mask-layout",sourceType:"a"},(0,e.tZ)("span",{className:"icon icon-link"})),"How to handle fixed column display over the mask layout?"),(0,e.tZ)("p",null,n[658].value,(0,e.tZ)("code",null,n[659].value),n[660].value,(0,e.tZ)("code",null,n[661].value),n[662].value),(0,e.tZ)("h3",{id:"how-to-custom-render-table-checkboxfor-example-adding-tooltip"},(0,e.tZ)(t.Z,{"aria-hidden":"true",tabIndex:"-1",href:"#how-to-custom-render-table-checkboxfor-example-adding-tooltip",sourceType:"a"},(0,e.tZ)("span",{className:"icon icon-link"})),"How to custom render Table Checkbox\uFF08For example, adding Tooltip\uFF09?"),(0,e.tZ)("p",null,n[663].value,(0,e.tZ)("code",null,n[664].value),n[665].value,(0,e.tZ)(t.Z,{href:"https://ant.design/components/table/#rowselection",sourceType:"a"},(0,e.tZ)("code",null,n[666].value)),n[667].value,(0,e.tZ)(t.Z,{href:"https://codesandbox.io/s/table-row-tooltip-v79j2v",sourceType:"a"},n[668].value),n[669].value))))}l.default=u}}]);