@gaopeng123/hooks.use-antd-table-selection
v0.7.10-alpha.0
Published
antd table selection
Downloads
14
Readme
useAntdTableSelection
antd表格处理多选逻辑
Usage
const [{selectedRows, selectedRowKeys, rowSelection}, {clearSelected}] = useAntdSelection({idKey: 'userId', defaultSelectedRowKeys: []});
return (
<ProTable<TableListItem>
actionRef={ref}
columns={columns}
// @ts-ignore
rowSelection={rowSelection}
...
/>
);