Skip to content

Commit 5cf234f

Browse files
authored
fix(AnalyticalTable): fix select-all behavior in React18 Strict Mode (#3658)
Fixes #3657
1 parent 885d56e commit 5cf234f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/main/src/components/AnalyticalTable/hooks/useRowSelectionColumn.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const headerProps = (
6767
const style = { ...props.style, cursor: 'pointer' };
6868
if (props.key === 'header___ui5wcr__internal_selection_column' && selectionMode === TableSelectionMode.MultiSelect) {
6969
const onClick = (e) => {
70-
toggleAllRowsSelected();
70+
toggleAllRowsSelected(!isAllRowsSelected);
7171
if (typeof onRowSelect === 'function') {
7272
onRowSelect(
7373
// cannot use instance.selectedFlatRows here as it only returns all rows on the first level

0 commit comments

Comments
 (0)