Skip to content

Commit

Permalink
chore: comment
Browse files Browse the repository at this point in the history
  • Loading branch information
anuraghazra committed Oct 7, 2024
1 parent 669dfeb commit b609aa3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/blade/src/components/Table/Table.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,8 @@ const _Table = <Item,>({
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;
Expand Down

0 comments on commit b609aa3

Please sign in to comment.