Skip to content

Commit

Permalink
fix: Add support for mac command key for selection manager (#3315)
Browse files Browse the repository at this point in the history
  • Loading branch information
rein1410 authored Jan 22, 2025
1 parent 09a8cce commit c1cfb73
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ export class SelectionManager<T> {
...this.items.slice(start, end).filter(a => !this._selection.find(s => itemsAreEqual(a, s))),
);
} else if (index === -1) {
if (multiSelect && (event?.ctrlKey || event?.shiftKey || additiveMode)) {
if (multiSelect && ((event?.ctrlKey || event?.metaKey) || event?.shiftKey || additiveMode)) {
this._selection.push(item);
} else {
this._selection = [item];
}
} else {
if (multiSelect && event?.ctrlKey) {
if (multiSelect && (event?.ctrlKey || event?.metaKey)) {
this._selection.splice(index, 1);
} else if (1 < this._selection.length && !additiveMode) {
this._selection = [item];
Expand Down

0 comments on commit c1cfb73

Please sign in to comment.