Skip to content

Commit

Permalink
Revert "Fix search selection option focus (#2842)" (#2902)
Browse files Browse the repository at this point in the history
This reverts commit 1c70f88.
  • Loading branch information
m-schieder authored Oct 17, 2023
1 parent 7f0bf00 commit 5e531de
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ export abstract class BaseSearchSelectorComponent extends BaseFormFieldControlCo
}
this._selectableItemsList = this.sortFn ? allItems.sort(this.sortFn) : allItems;
this.filteredItemsSubject.next(this.getFilteredItemsBySearchValue());
this.updateOptionFocus();
}

protected get selectableItems(): Selectable[] {
Expand Down Expand Up @@ -258,15 +257,6 @@ export abstract class BaseSearchSelectorComponent extends BaseFormFieldControlCo
document.body.appendChild(sheet);
}

private updateOptionFocus(): void {
setTimeout(() => {
if (!this.matSelect?.options.some(o => o.active)) {
this.matSelect.options.first.focus();
this.matSelect.options.first.setActiveStyles();
}
}, 200);
}

public onChipRemove(itemId: Id): void {
this.addOrRemoveId(itemId);

Expand Down Expand Up @@ -348,7 +338,6 @@ export abstract class BaseSearchSelectorComponent extends BaseFormFieldControlCo

protected onSearchValueUpdated(nextValue: string): void {
this.filteredItemsSubject.next(this.getFilteredItemsBySearchValue(nextValue.toLowerCase()));
this.updateOptionFocus();
}

protected initializeForm(): void {
Expand Down

0 comments on commit 5e531de

Please sign in to comment.