From 023ba94190a777467a2da47c31f8a4bdc03da3e4 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Mon, 27 Oct 2025 14:06:28 +0100 Subject: [PATCH] refactor(multiple): expose APIs necessary for demos Exposes some APIs used in the demos instead of accessing the private `_pattern`. (cherry picked from commit f0e411b56c071f01b506b1412a4fa0fb80381334) --- .../combobox-readonly/combobox-readonly-example.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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) {