From 79e2aee2e05a763be229830fd377ebf5a17dd8eb Mon Sep 17 00:00:00 2001 From: Leonardo Zizzamia Date: Wed, 5 Aug 2015 23:35:45 -0700 Subject: [PATCH] Fixed issue #153 --- bower.json | 2 +- package.json | 2 +- src/component/table.js | 4 +++- src/component/test/table-server-side.spec.js | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bower.json b/bower.json index fd20eac4..f66fa9fa 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "ng-tasty", - "version": "0.5.7", + "version": "0.5.8", "homepage": "https://github.com/Zizzamia/ng-tasty", "authors": [ { diff --git a/package.json b/package.json index 7e98a370..98273678 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ng-tasty", - "version": "0.5.7", + "version": "0.5.8", "description": "A lightweight, flexible, and tasty collection of reusable UI components for AngularJS.", "main": "dist/ng-tasty-tpls.min.js", "devDependencies": { diff --git a/src/component/table.js b/src/component/table.js index bad6732c..d26f5479 100644 --- a/src/component/table.js +++ b/src/component/table.js @@ -376,7 +376,9 @@ angular.module('ngTasty.component.table', [ }; } if (initNow || updateFrom === 'params') { - $scope.resourceCallback($scope.url, angular.copy($scope.params)) + var paramsObj = angular.copy($scope.params); + paramsObj.filters = $scope.filters; + $scope.resourceCallback($scope.url, paramsObj) .then(function (resource) { setDirectivesValues(resource); }); diff --git a/src/component/test/table-server-side.spec.js b/src/component/test/table-server-side.spec.js index 67c44b80..d4d5dbb7 100644 --- a/src/component/test/table-server-side.spec.js +++ b/src/component/test/table-server-side.spec.js @@ -181,6 +181,7 @@ describe('Component: table server side', function () { expect($scope.paramsObj.count).toEqual(5); expect($scope.paramsObj.thead).toEqual(true); expect($scope.paramsObj.pagination).toEqual(true); + expect($scope.paramsObj.filters.city).toEqual('sf'); }); it('should return a throw message if the response has the property header or rows defined', function () {