fix: Add optional chaining for getSelectedRows in TableComponent (#5805)
🐛 (tableComponent/index.tsx): fix potential null pointer exception when getting selected rows length
This commit is contained in:
parent
b0325ef2af
commit
00deb49c67
1 changed files with 1 additions and 1 deletions
|
|
@ -223,7 +223,7 @@ const TableComponent = forwardRef<
|
||||||
<TableOptions
|
<TableOptions
|
||||||
tableOptions={props.tableOptions}
|
tableOptions={props.tableOptions}
|
||||||
stateChange={columnStateChange}
|
stateChange={columnStateChange}
|
||||||
hasSelection={realRef.current?.api?.getSelectedRows().length > 0}
|
hasSelection={realRef.current?.api?.getSelectedRows()?.length > 0}
|
||||||
duplicateRow={props.onDuplicate ? props.onDuplicate : undefined}
|
duplicateRow={props.onDuplicate ? props.onDuplicate : undefined}
|
||||||
deleteRow={props.onDelete ? props.onDelete : undefined}
|
deleteRow={props.onDelete ? props.onDelete : undefined}
|
||||||
addRow={props.addRow ? props.addRow : undefined}
|
addRow={props.addRow ? props.addRow : undefined}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue