@ascentgl/ads-ui 21.125.2 → 21.125.3
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.
|
@@ -4965,25 +4965,10 @@ class AdsSearchDropdownComponent extends AbstractDropdownComponent {
|
|
|
4965
4965
|
*/
|
|
4966
4966
|
super.processOptions(options);
|
|
4967
4967
|
this.allOptions = new Map(this.displayedOptions);
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
* Then open the panel if the input is still focused.
|
|
4972
|
-
*/
|
|
4968
|
+
// Notify Angular that the view needs to be re-checked.
|
|
4969
|
+
// Required when a parent component uses OnPush change detection,
|
|
4970
|
+
// otherwise the new options won't render until the next CD cycle.
|
|
4973
4971
|
this.cdr.markForCheck();
|
|
4974
|
-
this.cdr.detectChanges();
|
|
4975
|
-
if (this.displayedOptions.size &&
|
|
4976
|
-
document.activeElement === this.input?.nativeElement &&
|
|
4977
|
-
!this.trigger?.panelOpen) {
|
|
4978
|
-
// Defer panel opening to next microtask to ensure the autocomplete
|
|
4979
|
-
// overlay picks up rendered options after change detection completes
|
|
4980
|
-
// (required when parent uses OnPush change detection).
|
|
4981
|
-
Promise.resolve().then(() => {
|
|
4982
|
-
if (document.activeElement === this.input?.nativeElement && !this.trigger?.panelOpen) {
|
|
4983
|
-
this.trigger?.openPanel();
|
|
4984
|
-
}
|
|
4985
|
-
});
|
|
4986
|
-
}
|
|
4987
4972
|
});
|
|
4988
4973
|
}
|
|
4989
4974
|
/** @ignore */
|