[ADF-3510] Search facets date-range goes invalid when empty - fix (#3741)

This commit is contained in:
Suzana Dirla
2018-09-07 12:05:55 +03:00
committed by Eugenio Romano
parent 931181dee0
commit 6ddf028d93

View File

@@ -22,7 +22,7 @@ export class LiveErrorStateMatcher implements ErrorStateMatcher {
isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean {
const isSubmitted = form && form.submitted;
return !!(control && control.invalid && (control.dirty || control.touched || isSubmitted));
return !!(control && control.invalid && (control.dirty || control.touched || (!control.pristine && isSubmitted)));
}
}