summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/shared
diff options
context:
space:
mode:
authorMichael Lando <ml636r@att.com>2017-07-22 17:10:02 +0300
committerMichael Lando <ml636r@att.com>2017-07-22 17:10:02 +0300
commit9db4052423f34a76296ffdcda896cdeba2b4aead (patch)
tree7c3b779c6d09be40283158382dee2cf02767761e /catalog-ui/src/app/ng2/shared
parent3c3c833897dbfc0e85feaf36086a505f990ecb76 (diff)
[sdc] 1710 rebase code
Change-Id: Icedeac71c0a9d27518969effcd5d5519de9955a6 Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'catalog-ui/src/app/ng2/shared')
-rw-r--r--catalog-ui/src/app/ng2/shared/search-bar/search-bar.component.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/catalog-ui/src/app/ng2/shared/search-bar/search-bar.component.ts b/catalog-ui/src/app/ng2/shared/search-bar/search-bar.component.ts
index 2835d20ba4..08bdf2030f 100644
--- a/catalog-ui/src/app/ng2/shared/search-bar/search-bar.component.ts
+++ b/catalog-ui/src/app/ng2/shared/search-bar/search-bar.component.ts
@@ -15,7 +15,9 @@ export class SearchBarComponent {
@Output() searchButtonClicked: EventEmitter<string> = new EventEmitter<string>();
searchButtonClick = (): void => {
- this.searchButtonClicked.emit(this.searchQuery);
+ if (this.searchQuery) { //do not allow empty search
+ this.searchButtonClicked.emit(this.searchQuery);
+ }
}
searchQueryChange = ($event): void => {
@@ -24,7 +26,7 @@ export class SearchBarComponent {
private clearSearchQuery = (): void => {
this.searchQuery = "";
- this.searchButtonClick();
+ this.searchButtonClicked.emit(this.searchQuery);
}
}