18 lines
491 B
TypeScript
18 lines
491 B
TypeScript
import {Directive, Input, OnInit} from "@angular/core";
|
|
import {MatSelect} from "@angular/material/select";
|
|
|
|
@Directive({
|
|
selector: '[modal-select]'
|
|
})
|
|
export class ModalSelectDirective implements OnInit{
|
|
|
|
@Input() matSelect: MatSelect;
|
|
|
|
ngOnInit() {
|
|
this.matSelect._openedStream.subscribe( () => {
|
|
let divElement: HTMLDivElement = <HTMLDivElement>document.getElementsByClassName('cdk-overlay-container')[0];
|
|
divElement.classList.add('modal-select');
|
|
});
|
|
}
|
|
}
|