dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app/utils/modal-select/modal-select.directive.ts @ 59152
1 |
import {Directive, Input, OnInit} from "@angular/core"; |
---|---|
2 |
import {MatSelect} from "@angular/material/select"; |
3 |
|
4 |
@Directive({ |
5 |
selector: '[modal-select]' |
6 |
})
|
7 |
export class ModalSelectDirective implements OnInit{ |
8 |
|
9 |
@Input() matSelect: MatSelect; |
10 |
|
11 |
ngOnInit() { |
12 |
this.matSelect._openedStream.subscribe( () => { |
13 |
let divElement: HTMLDivElement = <HTMLDivElement>document.getElementsByClassName('cdk-overlay-container')[0]; |
14 |
divElement.classList.add('modal-select'); |
15 |
});
|
16 |
}
|
17 |
}
|