@coreui/angular-pro 5.5.14 → 5.5.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3515,6 +3515,7 @@ class AutocompleteComponent {
|
|
|
3515
3515
|
static ngAcceptInputType_visible;
|
|
3516
3516
|
static ngAcceptInputType_visibleItems;
|
|
3517
3517
|
isExternalSearch = isExternalSearch;
|
|
3518
|
+
#document = inject(DOCUMENT);
|
|
3518
3519
|
#destroyRef = inject(DestroyRef);
|
|
3519
3520
|
#elementRef = inject(ElementRef);
|
|
3520
3521
|
#focusMonitor = inject(FocusMonitor);
|
|
@@ -3524,7 +3525,7 @@ class AutocompleteComponent {
|
|
|
3524
3525
|
optionsRef = viewChild(AutocompleteOptionsComponent, ...(ngDevMode ? [{ debugName: "optionsRef" }] : []));
|
|
3525
3526
|
optionsRefEffect = effect(() => {
|
|
3526
3527
|
const optionsRef = this.optionsRef();
|
|
3527
|
-
if (!optionsRef) {
|
|
3528
|
+
if (!optionsRef && this.#elementRef.nativeElement.contains(this.#document.activeElement)) {
|
|
3528
3529
|
this.inputPortalContent().nativeElement.focus();
|
|
3529
3530
|
}
|
|
3530
3531
|
}, ...(ngDevMode ? [{ debugName: "optionsRefEffect" }] : []));
|