Skip to content

Commit

Permalink
fix(plugin): Grid Menu Clear Frozen Cols shouldn't change cols positi…
Browse files Browse the repository at this point in the history
…ons (#291)
  • Loading branch information
ghiscoding committed Mar 18, 2021
1 parent 2a91fa6 commit 4fdab08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/common/src/extensions/gridMenuExtension.ts
Expand Up @@ -397,7 +397,10 @@ export class GridMenuExtension implements Extension {
case 'clear-frozen-columns':
const visibleColumns = [...this.sharedService.visibleColumns];
this.sharedService.slickGrid.setOptions({ frozenColumn: -1, enableMouseWheelScrollHandler: false });
if (Array.isArray(visibleColumns) && Array.isArray(this.sharedService.allColumns) && visibleColumns.length !== this.sharedService.allColumns.length) {

// SlickGrid seems to be somehow resetting the columns to their original positions,
// so let's re-fix them to the position we kept as reference
if (Array.isArray(visibleColumns)) {
this.sharedService.slickGrid.setColumns(visibleColumns);
}
break;
Expand Down
Binary file not shown.

0 comments on commit 4fdab08

Please sign in to comment.