From b609aa3fefa21f08b2f8a385df0b7118ae577c18 Mon Sep 17 00:00:00 2001 From: anuraghazra Date: Mon, 7 Oct 2024 14:49:19 +0530 Subject: [PATCH] chore: comment --- packages/blade/src/components/Table/Table.web.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/blade/src/components/Table/Table.web.tsx b/packages/blade/src/components/Table/Table.web.tsx index 88d7094ef50..b41e44a77c6 100644 --- a/packages/blade/src/components/Table/Table.web.tsx +++ b/packages/blade/src/components/Table/Table.web.tsx @@ -288,6 +288,8 @@ const _Table = ({ rowSelect: selectionType !== 'none' ? rowSelectType[selectionType] : undefined, }, ); + // If selectedIds is provided, then it is a controlled component + // We force the useRowSelect's state to sync with the selectedIds const isControlled = selectedIds !== undefined; if (isControlled && selectionType !== 'none') { rowSelectConfig.state.ids = selectedRows;