Skip to content

Commit

Permalink
fix: select all issue fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
himanshu634 committed Jul 9, 2024
1 parent e9253ca commit 81bc711
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions wren-ui/src/components/table/MultiSelectBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,15 @@ export default function MultiSelectBox(props: Props) {
if (keys.length !== 1) {
if (keys.length === 0) {
setSelectedRowKeys(new Set());
onChange && onChange([]);
return;
}
setSelectedRowKeys(
new Set([...selectedRowKeys, ...(keys as string[])]),
);
const newSelectedRowKeys = [
...selectedRowKeys,
...(keys as string[]),
];
setSelectedRowKeys(new Set(newSelectedRowKeys));
onChange && onChange(newSelectedRowKeys);
}
},
}}
Expand Down

0 comments on commit 81bc711

Please sign in to comment.