From ca1f84e25ac34ca26d174631e0e2acc62bc5250b Mon Sep 17 00:00:00 2001 From: Rick Zakharov Date: Fri, 17 Feb 2017 12:54:43 -0500 Subject: [PATCH] Fixed: grid doesn't refresh when _gridOptions.data is an empty array --- .vscode/settings.json | 3 +++ bower.json | 2 +- contributors.txt | 3 ++- src/js/dataGrid.js | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..0c4a669 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "vsicons.presets.angular": false +} \ No newline at end of file diff --git a/bower.json b/bower.json index 7d0146a..a13c232 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "angular-data-grid", - "version": "0.0.1", + "version": "0.0.2", "homepage": "https://github.com/angular-data-grid/angular-data-grid.github.io", "authors": [ "Zhuk", diff --git a/contributors.txt b/contributors.txt index d27c44e..72f62f0 100644 --- a/contributors.txt +++ b/contributors.txt @@ -1,2 +1,3 @@ Eugene Draitsev -Ivan Bisultanov \ No newline at end of file +Ivan Bisultanov +Rick Zakharov \ No newline at end of file diff --git a/src/js/dataGrid.js b/src/js/dataGrid.js index 8917d18..a2ee31f 100644 --- a/src/js/dataGrid.js +++ b/src/js/dataGrid.js @@ -38,7 +38,7 @@ $scope.urlSync = $scope._gridOptions.urlSync; $scope.$watch('_gridOptions.data', function (newValue) { - if (newValue && newValue.length) { + if (newValue && newValue.length > -1) { $scope.sortCache = {}; $scope.filtered = $scope._gridOptions.data.slice(); $scope.filters.forEach(function (filter) {