Skip to content
This repository has been archived by the owner on Feb 13, 2019. It is now read-only.

Commit

Permalink
Don't add search query param for list pages if search is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Kos committed Jun 19, 2015
1 parent 818dd67 commit 13d0172
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/shared/list-page/list-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ angular.module('listPage', [
// search functionality
$scope.$search = function (query) {
$scope.searchFilter = {};
$scope.searchFilter[$scope.searchParameter] = query;

if (query) {
$scope.searchFilter[$scope.searchParameter] = query;
}

// go to page 1, new results may not have more than 1 page
$scope.$list.$page = 1;
Expand Down

0 comments on commit 13d0172

Please sign in to comment.