diff --git a/sharedComponents/input/input.component.ts b/sharedComponents/input/input.component.ts index 6b16d826..b853fa7b 100644 --- a/sharedComponents/input/input.component.ts +++ b/sharedComponents/input/input.component.ts @@ -15,7 +15,6 @@ import { import {AbstractControl, FormArray, FormControl, ValidatorFn} from "@angular/forms"; import {HelperFunctions} from "../../utils/HelperFunctions.class"; import {Observable, of, Subscription} from "rxjs"; -import {MatSelect} from "@angular/material/select"; import {MatAutocompleteSelectedEvent} from "@angular/material/autocomplete"; import {map, startWith} from "rxjs/operators"; import {MatChipInputEvent} from "@angular/material/chips"; @@ -283,7 +282,9 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang ngAfterViewInit() { /** If options are available set max-height base on input-wrapper height */ if(this.options && this.options.length > 1) { - this.elementRef.nativeElement.style.maxHeight = this.inputBox.nativeElement.clientHeight + 'px'; + setTimeout(() => { + this.elementRef.nativeElement.style.maxHeight = this.inputBox.nativeElement.clientHeight + 'px'; + }, 0); } this.reset(); } @@ -342,6 +343,8 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang } if (this.initValue === value || (this.initValue === '' && value === null)) { this.formControl.markAsPristine(); + } else { + this.formControl.markAsDirty(); } if (this.searchControl) { this.searchControl.setValue(null);