Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.

Commit 0a9dbe7

Browse files
committed
refactor: keep freezeColumn ref when changing freezing columns
1 parent 07d190b commit 0a9dbe7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/app/modules/angular-slickgrid/extensions/headerMenuExtension.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ export class HeaderMenuExtension implements Extension {
341341
const visibleColumns = [...this.sharedService.visibleColumns];
342342
const columnPosition = visibleColumns.findIndex((col) => col.id === args.column.id);
343343
this.sharedService.grid.setOptions({ frozenColumn: columnPosition, enableMouseWheelScrollHandler: true } as GridOption);
344+
this.sharedService.frozenVisibleColumnId = args.column.id;
344345

345346
// to freeze columns, we need to take only the visible columns and we also need to use setColumns() when some of them are hidden
346347
// to make sure that we only use the visible columns, not doing this would show back some of the hidden columns

0 commit comments

Comments
 (0)