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