{selectable && (
-
+ |
toggleRowSelection(rowId)}
@@ -41,7 +41,11 @@ export const TableRow = ({
{columns.map((column, index) => (
{row[column.key] as React.ReactNode}
diff --git a/packages/react-components/src/components/Table/hooks.ts b/packages/react-components/src/components/Table/hooks.ts
index 896584652..c58df2a86 100644
--- a/packages/react-components/src/components/Table/hooks.ts
+++ b/packages/react-components/src/components/Table/hooks.ts
@@ -27,7 +27,7 @@ export const useTable = ({
const toggleRowSelection = useCallback(
(id: string | number) => {
- const updatedSelectedRows = new Set(selectedRows);
+ const updatedSelectedRows = new Set(selectedRows || []);
if (updatedSelectedRows.has(id)) {
updatedSelectedRows.delete(id);
} else {
| |