Skip to content

Commit c87e29d

Browse files
Alexander ZhukAlexander Zhuk
authored andcommitted
fixing 'grid doesn't refresh when _gridOptions.data is an empty array' issue
1 parent 3484f37 commit c87e29d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

dist/dataGrid.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
$scope.urlSync = $scope._gridOptions.urlSync;
3939

4040
$scope.$watch('_gridOptions.data', function (newValue) {
41-
if (newValue && newValue.length) {
41+
if (newValue && newValue.length > -1) {
4242
$scope.sortCache = {};
4343
$scope.filtered = $scope._gridOptions.data.slice();
4444
$scope.filters.forEach(function (filter) {

dist/dataGrid.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/js/dataGrid.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
$scope.urlSync = $scope._gridOptions.urlSync;
3939

4040
$scope.$watch('_gridOptions.data', function (newValue) {
41-
if (newValue && newValue.length) {
41+
if (newValue && newValue.length > -1) {
4242
$scope.sortCache = {};
4343
$scope.filtered = $scope._gridOptions.data.slice();
4444
$scope.filters.forEach(function (filter) {

0 commit comments

Comments
 (0)