Skip to content

Commit

Permalink
Misc changes for the new tree- and -list api #3696
Browse files Browse the repository at this point in the history
  • Loading branch information
ashklianko committed Sep 12, 2024
1 parent 3558375 commit 4b96802
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export class FilterableListBoxWrapper<I>
const focusedItem: I = this.getFocusedItem();

if (focusedItem) {
this.toggleSelection(focusedItem, this.isItemSelected(focusedItem));
this.handleUserToggleAction(focusedItem);
return false;
}

Expand Down Expand Up @@ -243,11 +243,7 @@ export class FilterableListBoxWrapper<I>

if (focusedItem) {
if (this.selectionDelta.size === 0) {
if (this.isItemSelected(focusedItem)) {
this.deselect(focusedItem);
} else {
this.select(focusedItem);
}
this.handleUserToggleAction(focusedItem);
}

this.applySelection();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,14 +296,6 @@ export class SelectableListBoxWrapper<I>
this.deselect(this.getCurrentlySelectedItems(), silent);
}

toggleSelection(item: I, selected: boolean, silent?: boolean): void {
if (selected) {
this.deselect(item, silent);
} else {
this.select(item, silent);
}
}

updateItem(item: I): void {
this.listBox.replaceItems(item);
}
Expand Down

0 comments on commit 4b96802

Please sign in to comment.