Skip to content

Commit

Permalink
Fix #3388: Cell selection with metakey (#3417)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored Oct 7, 2022
1 parent 9329494 commit fba792c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions components/lib/datatable/TableBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,7 @@ export const TableBody = React.memo(
const onRangeSelection = (event, type) => {
DomHandler.clearSelection();
rangeRowIndex.current = allowCellSelection() ? event.rowIndex : event.index;
let selectionInRange = selectRange(event);
let selection = isMultipleSelection() ? [...new Set([...(props.selection || []), ...selectionInRange])] : selectionInRange;
const selection = selectRange(event);

if (props.onSelectionChange && selection !== props.selection) {
props.onSelectionChange({
Expand Down

0 comments on commit fba792c

Please sign in to comment.