2022-06-29 13:30:06 +03:00

34 lines
752 B
JavaScript

import Table from 'Elements/Table';
import { useStore } from 'stores/hooks';
import { columns } from './config';
export default function FinGAPTable() {
const { $tables } = useStore();
const { finGAP } = $tables;
return (
<Table
columns={columns}
dataSource={finGAP.risks}
rowSelection={{
type: 'checkbox',
onChange: (_, selectedRows) => {
const selectedKeys = selectedRows.reduce((acc, row) => {
acc.push(row.key);
if (row.keys) return [...acc, ...row.keys];
return acc;
}, []);
finGAP.setSelectedKeys(selectedKeys);
},
}}
pagination={false}
size="small"
scroll={{
x: true,
}}
/>
);
}