Prevent live search from being run too soon (#1402)

Refs #1356
This commit is contained in:
Will Abson
2017-01-06 11:00:14 +00:00
committed by Denys Vuika
parent 779d456c63
commit 8c0048ad7f
2 changed files with 34 additions and 2 deletions

View File

@@ -111,9 +111,9 @@ export class AlfrescoSearchControlComponent implements OnInit, OnDestroy {
}
private onSearchTermChange(value: string): void {
this.liveSearchTerm = value;
this.searchControl.setValue(value, true);
this.searchValid = this.searchControl.valid;
this.liveSearchTerm = this.searchValid ? value : '';
this.searchControl.setValue(value, true);
this.searchChange.emit({
value: value,
valid: this.searchValid