diff --git a/src/components-examples/aria/combobox/combobox-readonly/combobox-readonly-example.ts b/src/components-examples/aria/combobox/combobox-readonly/combobox-readonly-example.ts index fb4e99020716..e5feb3e6cbab 100644 --- a/src/components-examples/aria/combobox/combobox-readonly/combobox-readonly-example.ts +++ b/src/components-examples/aria/combobox/combobox-readonly/combobox-readonly-example.ts @@ -51,10 +51,9 @@ export class ComboboxReadonlyExample { afterRenderEffect(() => { const popover = this.popover()!; const combobox = this.combobox()!; - combobox._pattern.expanded() ? this.showPopover() : popover.nativeElement.hidePopover(); + combobox.expanded() ? this.showPopover() : popover.nativeElement.hidePopover(); - // TODO(wagnermaciel): Make this easier for developers to do. - this.listbox()?._pattern.inputs.activeItem()?.element().scrollIntoView({block: 'nearest'}); + this.listbox()?.scrollActiveItemIntoView(); }); } @@ -62,7 +61,7 @@ export class ComboboxReadonlyExample { const popover = this.popover()!; const combobox = this.combobox()!; - const comboboxRect = combobox._pattern.inputs.inputEl()?.getBoundingClientRect(); + const comboboxRect = combobox.inputElement()?.getBoundingClientRect(); const popoverEl = popover.nativeElement; if (comboboxRect) {