diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-06-10 18:18:29 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-06-10 18:18:29 +0200 |
commit | 641f98b2eeb155d2a93d76c9f83ad9eafa3aac1e (patch) | |
tree | 218692a24b11eb6f8e8f1aed399384d3d13915d3 /client | |
parent | c6de16eb1d243610472316ea080348af4c3084ba (diff) | |
download | PeerTube-641f98b2eeb155d2a93d76c9f83ad9eafa3aac1e.tar.gz PeerTube-641f98b2eeb155d2a93d76c9f83ad9eafa3aac1e.tar.zst PeerTube-641f98b2eeb155d2a93d76c9f83ad9eafa3aac1e.zip |
Don't make a search when the field is changed and the value is empty
Diffstat (limited to 'client')
-rw-r--r-- | client/src/app/shared/search/search.component.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/client/src/app/shared/search/search.component.ts b/client/src/app/shared/search/search.component.ts index ed1ce807a..2f89d83bf 100644 --- a/client/src/app/shared/search/search.component.ts +++ b/client/src/app/shared/search/search.component.ts | |||
@@ -51,7 +51,10 @@ export class SearchComponent implements OnInit { | |||
51 | $event.stopPropagation(); | 51 | $event.stopPropagation(); |
52 | 52 | ||
53 | this.searchCriterias.field = choice; | 53 | this.searchCriterias.field = choice; |
54 | this.doSearch(); | 54 | |
55 | if (this.searchCriterias.value !== '') { | ||
56 | this.doSearch(); | ||
57 | } | ||
55 | } | 58 | } |
56 | 59 | ||
57 | doSearch() { | 60 | doSearch() { |