From 6ddf028d93e0d2b30d8792f4135dbf14e2ab5023 Mon Sep 17 00:00:00 2001 From: Suzana Dirla Date: Fri, 7 Sep 2018 12:05:55 +0300 Subject: [PATCH] [ADF-3510] Search facets date-range goes invalid when empty - fix (#3741) --- lib/content-services/search/forms/live-error-state-matcher.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/content-services/search/forms/live-error-state-matcher.ts b/lib/content-services/search/forms/live-error-state-matcher.ts index 4257d4afa6..fabdb07dc3 100644 --- a/lib/content-services/search/forms/live-error-state-matcher.ts +++ b/lib/content-services/search/forms/live-error-state-matcher.ts @@ -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))); } }