Skip to content

Commit

Permalink
fix(core): pinning 1st column could caused the header to get misaligned
Browse files Browse the repository at this point in the history
- follows SlickGrid PR: 6pac/SlickGrid#1039
  • Loading branch information
ghiscoding authored Jul 25, 2024
1 parent 5cf630b commit 42c94e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/common/src/core/slickGrid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3036,7 +3036,7 @@ export class SlickGrid<TData = any, C extends Column<TData> = Column<TData>, O e
}

// before applying column freeze, we need our viewports to be scrolled back to left to avoid misaligned column headers
if (newOptions.frozenColumn) {
if (newOptions.frozenColumn !== undefined && newOptions.frozenColumn >= 0) {
this.getViewports().forEach(vp => vp.scrollLeft = 0);
this.handleScroll(); // trigger scroll to realign column headers as well
}
Expand Down

0 comments on commit 42c94e8

Please sign in to comment.