Skip to content

Commit dff444a

Browse files
EugenDraytsevEugenDraytsev
authored andcommitted
bugfix with sortCache
1 parent 0a74a86 commit dff444a

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

dist/dataGrid.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737

3838
$scope.$watch('_gridOptions.data', function (newValue) {
3939
if (newValue && newValue.length) {
40-
$scope.filtered = angular.copy($scope._gridOptions.data);
40+
$scope.sortCache = {};
41+
$scope.filtered = $scope._gridOptions.data.slice();
4142
$scope.filters.forEach(function (filter) {
4243
if (filter.filterType === 'select') {
4344
$scope[filter.model + 'Options'] = generateOptions($scope.filtered, filter.filterBy);

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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737

3838
$scope.$watch('_gridOptions.data', function (newValue) {
3939
if (newValue && newValue.length) {
40-
$scope.filtered = angular.copy($scope._gridOptions.data);
40+
$scope.sortCache = {};
41+
$scope.filtered = $scope._gridOptions.data.slice();
4142
$scope.filters.forEach(function (filter) {
4243
if (filter.filterType === 'select') {
4344
$scope[filter.model + 'Options'] = generateOptions($scope.filtered, filter.filterBy);

0 commit comments

Comments
 (0)