Skip to content

Commit

Permalink
Fixed an issue where pinning the first column caused the header to ge…
Browse files Browse the repository at this point in the history
…t misaligned (#1039)
  • Loading branch information
songyuchen415 authored Jul 24, 2024
1 parent 8d4a290 commit d9b7412
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 d9b7412

Please sign in to comment.