fix: rowSelection undefined (#2071)

This commit is contained in:
katherinehhh 2023-06-18 14:22:46 +08:00 committed by GitHub
parent 6d0f5c1fe0
commit 50865d76bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -222,7 +222,7 @@ export const Table: any = observer((props: any) => {
const [selectedRowKeys, setSelectedRowKeys] = useState<any[]>(field?.data?.selectedRowKeys || []); const [selectedRowKeys, setSelectedRowKeys] = useState<any[]>(field?.data?.selectedRowKeys || []);
const [selectedRow, setSelectedRow] = useState([]); const [selectedRow, setSelectedRow] = useState([]);
const dataSource = field?.value?.slice?.()?.filter?.(Boolean) || []; const dataSource = field?.value?.slice?.()?.filter?.(Boolean) || [];
const isRowSelect = rowSelection.type !== 'none'; const isRowSelect = rowSelection?.type !== 'none';
let onRow = null, let onRow = null,
highlightRow = ''; highlightRow = '';