@gaopeng123/hooks.use-antd-table-selection
TypeScript icon, indicating that this package has built-in type declarations

0.7.10-alpha.0 • Public • Published

useAntdTableSelection

antd表格处理多选逻辑

在线demo

Usage

const [{selectedRows, selectedRowKeys, rowSelection}, {clearSelected}] = useAntdSelection({idKey: 'userId', defaultSelectedRowKeys: []});
return (
  <ProTable<TableListItem>
            actionRef={ref}
            columns={columns}
            // @ts-ignore
            rowSelection={rowSelection}
    ...
    />
);

Readme

Keywords

Package Sidebar

Install

npm i @gaopeng123/hooks.use-antd-table-selection

Weekly Downloads

0

Version

0.7.10-alpha.0

License

MIT

Unpacked Size

9.15 kB

Total Files

9

Last publish

Collaborators

  • gaopeng123