Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
fix(facetsFreeText): do nothing if empty term
Browse files Browse the repository at this point in the history
Closes #1053
  • Loading branch information
Christine Yu committed Aug 4, 2015
1 parent 60c233b commit c1b8b53
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app/scripts/components/facets/facets.controllers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ module ngApp.components.facets.controllers {
}

setTerm(): void {
if (this.searchTerm === "") {
return;
}
this.FacetService.addTerm(this.$scope.field, this.searchTerm);
this.actives.push(this.searchTerm);
this.searchTerm = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
class="form-control"
style="border-radius: 0px;">
<span class="input-group-btn" data-ng-if="!ftc.autocomplete">
<button class="btn btn-default" type="button" data-ng-click="ftc.setTerm()">Go!</button>
<button class="btn btn-default" type="button" data-ng-click="ftc.setTerm()" data-ng-class="{'disabled' : ftc.searchTerm === ''}">Go!</button>
</span>
</div>
</div>

0 comments on commit c1b8b53

Please sign in to comment.