]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Don't make a search when the field is changed and the value is empty
authorChocobozzz <florian.bigard@gmail.com>
Fri, 10 Jun 2016 16:18:29 +0000 (18:18 +0200)
committerChocobozzz <florian.bigard@gmail.com>
Fri, 10 Jun 2016 16:18:29 +0000 (18:18 +0200)
client/src/app/shared/search/search.component.ts

index ed1ce807ac0145f917aa04e396df9a35d2d42d58..2f89d83bf4a7b4312e78a1355d8a8c5ed4aa15ba 100644 (file)
@@ -51,7 +51,10 @@ export class SearchComponent implements OnInit {
     $event.stopPropagation();
 
     this.searchCriterias.field = choice;
-    this.doSearch();
+
+    if (this.searchCriterias.value !== '') {
+      this.doSearch();
+    }
   }
 
   doSearch() {