You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the enhancement:
Since the overlayDir: CdkConnectedOverlay property in the MatSelect class will be deprecated soon in Angular 10, you should consider to replace it in the MatSelectSearchComponent with following code.
Describe the solution
this.matSelect.openedChange
.pipe(takeUntil(this._onDestroy))
.subscribe((opened: boolean) => {
if (opened) {
// note: this is hacky, but currently there is no better way to do this
let element: HTMLElement = this.searchSelectInput.nativeElement;
let overlayElement: HTMLElement;
while (element = element.parentElement) {
if (element.classList.contains('cdk-overlay-pane')) {
overlayElement = element;
break;
}
}
if (overlayElement) {
overlayElement.classList.add(overlayClass);
}
}
});
Also consider to run the following test should show a search field and focus it when opening the select synchronous in the MatSelectSearchTestComponent to make all tests successful again.
Gruess
Evoltafreak
The text was updated successfully, but these errors were encountered:
Describe the enhancement:
Since the
overlayDir: CdkConnectedOverlay
property in theMatSelect
class will be deprecated soon in Angular 10, you should consider to replace it in theMatSelectSearchComponent
with following code.Describe the solution
Also consider to run the following test
should show a search field and focus it when opening the select
synchronous in theMatSelectSearchTestComponent
to make all tests successful again.Gruess
Evoltafreak
The text was updated successfully, but these errors were encountered: