Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion client/app/dashboard/model/list/ModelList.js
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,10 @@ angular.module('dashboard.Dashboard.Model.List', [

$scope.$watch('sortInfo', function (newVal, oldVal) {
//Check isFirstLoad so that this watch statement does not get called when the page loads for the first time
if (!isFirstLoad && newVal !== oldVal) {
if (!isFirstLoad &&
newVal && oldVal &&
(!_.isEqual(newVal.directions, oldVal.directions) ||
!_.isEqual(newVal.fields, oldVal.fields))) {
$scope.loadItems();
}
}, true);
Expand Down