Skip to content

Commit

Permalink
fix(example): should re-render after clearing groups, fixes #407
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding-SE committed Mar 2, 2020
1 parent 05b3a54 commit 7752abd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
10 changes: 4 additions & 6 deletions src/app/examples/grid-draggrouping.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ export class GridDraggableGroupingComponent implements OnInit {
if (this.draggableGroupingPlugin && this.draggableGroupingPlugin.setDroppedGroups) {
this.draggableGroupingPlugin.clearDroppedGroups();
}
this.gridObj.invalidate(); // invalidate all rows and re-render
}

clearGroupingSelects() {
Expand Down Expand Up @@ -306,8 +307,7 @@ export class GridDraggableGroupingComponent implements OnInit {
if (this.draggableGroupingPlugin && this.draggableGroupingPlugin.setDroppedGroups) {
this.showPreHeader();
this.draggableGroupingPlugin.setDroppedGroups('duration');
this.gridObj.invalidate();
this.gridObj.render();
this.gridObj.invalidate(); // invalidate all rows and re-render
}
}

Expand All @@ -326,8 +326,7 @@ export class GridDraggableGroupingComponent implements OnInit {
if (this.draggableGroupingPlugin && this.draggableGroupingPlugin.setDroppedGroups) {
this.showPreHeader();
this.draggableGroupingPlugin.setDroppedGroups(['duration', 'effortDriven']);
this.gridObj.invalidate();
this.gridObj.render();
this.gridObj.invalidate(); // invalidate all rows and re-render
}
}

Expand All @@ -339,8 +338,7 @@ export class GridDraggableGroupingComponent implements OnInit {

this.showPreHeader();
this.draggableGroupingPlugin.setDroppedGroups(groupedFields);
this.gridObj.invalidate();
this.gridObj.render();
this.gridObj.invalidate(); // invalidate all rows and re-render
}
}

Expand Down
1 change: 0 additions & 1 deletion src/app/examples/grid-grouping.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
SortDirectionNumber,
Sorters,
} from './../modules/angular-slickgrid';
import { Subscription } from 'rxjs';

@Injectable()
@Component({
Expand Down

0 comments on commit 7752abd

Please sign in to comment.