Skip to content

Commit

Permalink
Fix primefaces#3388: Cell selection with metakey
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Oct 4, 2022
1 parent 84468cd commit fe12df6
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 fe12df6

Please sign in to comment.