mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
[ACS-9374] Show validation error on checking and unchecking checkbox
This commit is contained in:
+2
-2
@@ -118,7 +118,7 @@ export class SearchInputControlComponent implements OnInit, OnChanges {
|
||||
}
|
||||
|
||||
ngOnChanges(changes: SimpleChanges): void {
|
||||
if (changes['hasLibrariesConstraint'] && !changes['hasLibrariesConstraint'].firstChange && this.searchFieldFormControl.touched) {
|
||||
if (changes['hasLibrariesConstraint'] && !changes['hasLibrariesConstraint'].firstChange) {
|
||||
this.emitValidationError();
|
||||
}
|
||||
}
|
||||
@@ -149,7 +149,7 @@ export class SearchInputControlComponent implements OnInit, OnChanges {
|
||||
return this.searchTerm.trim()?.length < 2;
|
||||
}
|
||||
|
||||
private emitValidationError(): void {
|
||||
emitValidationError(): void {
|
||||
const errors = this.searchFieldFormControl.errors;
|
||||
if (errors?.whitespace) {
|
||||
this.validationError.emit('SEARCH.INPUT.WHITESPACE');
|
||||
|
||||
@@ -211,6 +211,8 @@ export class SearchInputComponent implements OnInit, OnDestroy {
|
||||
this.syncInputValues();
|
||||
this.has400LibraryError = false;
|
||||
|
||||
this.searchInputControl.emitValidationError();
|
||||
|
||||
if (!this.searchedWord.trim()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user