Skip to content

Commit

Permalink
fix(groupRow): table columns are lost when switching between groups
Browse files Browse the repository at this point in the history
  • Loading branch information
ccrowhurstram committed Aug 28, 2015
1 parent 7b30995 commit 6d2c735
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions src/scripts/ngTableGroupRowController.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,19 @@
}

function groupBy(group){
if (group.groupable){
if (group.groupable($scope) === $scope.$selGroup){
changeSortDirection();
} else {
var existingGroupCol = findGroupColumn($scope.$selGroup);
if (existingGroupCol && existingGroupCol.show.assign && group.show.assign){
existingGroupCol.show.assign($scope, true);
if (isSelectedGroup(group)){
changeSortDirection();
} else {
var existingGroupCol = findGroupColumn($scope.$selGroup);
if (existingGroupCol && existingGroupCol.show.assign){
existingGroupCol.show.assign($scope, true);
}
if (group.groupable){
if (group.show.assign){
group.show.assign($scope, false);
}
$scope.params.group(group.groupable($scope));
}
} else{
if (group === $scope.$selGroup){
changeSortDirection();
} else {
} else{
$scope.params.group(group);
}
}
Expand Down

0 comments on commit 6d2c735

Please sign in to comment.