blob: 4b98c7e2603d472243efd512d2e2a8b20a25a16c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
import {Component, Input, OnChanges, SimpleChanges} from "@angular/core";
import {FormGroup} from "@angular/forms";
import {MultiselectFormControl} from "../../../../models/formControlModels/multiselectFormControl.model";
@Component({
selector: 'multiselect-form-control',
templateUrl: './multiselect.formControl.component.html'
})
export class MultiselectFormControlComponent implements OnChanges{
@Input() data: MultiselectFormControl = null;
@Input() form: FormGroup = null;
ngOnChanges(changes: SimpleChanges): void {
if (changes["data"] !== undefined && changes["data"].currentValue !== changes["data"].previousValue && changes["data"].firstChange) {
if(this.data.onInit){
this.data.onInit(this.data, this.form);
}
}
}
}
|