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 812a8aa commit 58fd121
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/demo/component/grid/grid-range-selection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ export class Example extends LitElement {

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

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

0 comments on commit 58fd121

Please sign in to comment.