Skip to content

Commit

Permalink
fix(autocomplete): traverse composed slots when locating input element (
Browse files Browse the repository at this point in the history
  • Loading branch information
DRiFTy17 authored Feb 12, 2025
1 parent 77962aa commit 74bf5e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/autocomplete/autocomplete-adapter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getActiveElement, toggleAttribute } from '@tylertech/forge-core';
import { deepQuerySelectorAll, getActiveElement, toggleAttribute } from '@tylertech/forge-core';
import { CHIP_FIELD_CONSTANTS, IChipFieldComponent } from '../chip-field';
import { BaseAdapter, IBaseAdapter } from '../core/base/base-adapter';
import { setAriaControls, tryCreateAriaControlsPlaceholder } from '../core/utils/utils';
Expand Down Expand Up @@ -68,7 +68,7 @@ export class AutocompleteAdapter extends BaseAdapter<IAutocompleteComponent> imp
}

public setInputElement(): HTMLInputElement {
const inputElements = this._component.querySelectorAll(AUTOCOMPLETE_CONSTANTS.selectors.INPUT);
const inputElements = deepQuerySelectorAll(this._component, AUTOCOMPLETE_CONSTANTS.selectors.INPUT, false);
if (inputElements.length) {
this._inputElement = inputElements[0] as HTMLInputElement;
}
Expand Down

0 comments on commit 74bf5e4

Please sign in to comment.