Skip to content

Commit

Permalink
polish
Browse files Browse the repository at this point in the history
  • Loading branch information
vursen committed Dec 19, 2024
1 parent 175154e commit 812a8aa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/demo/component/grid/react/grid-range-selection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ function Example() {

// Update the selection state of the items within the range
// based on the state of the current item
const selectedItemsCopy = new Set(selectedItems.value);
const newSelectedItems = new Set(selectedItems.value);
rangeItems.forEach((rangeItem) => {
if (selected) {
selectedItemsCopy.add(rangeItem);
newSelectedItems.add(rangeItem);
} else {
selectedItemsCopy.delete(rangeItem);
newSelectedItems.delete(rangeItem);
}
});
selectedItems.value = [...selectedItemsCopy];
selectedItems.value = [...newSelectedItems];
}

// Update the anchor point to the current item
Expand Down

0 comments on commit 812a8aa

Please sign in to comment.