Skip to content

Commit

Permalink
fix: issue where pinning the first column caused the header to get mi…
Browse files Browse the repository at this point in the history
…saligned, fixes #1038 (#1039)
  • Loading branch information
songyuchen415 authored and ghiscoding-SE committed Jul 24, 2024
1 parent 8d4a290 commit d006605
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/slick.grid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3604,7 +3604,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 d006605

Please sign in to comment.