Skip to content

fix: treat frozenRow: 0 as no freeze (input clamp) - #2702

Merged
ghiscoding merged 1 commit into
masterfrom
fix/frozen-row-zero-clamp
Aug 7, 2026
Merged

fix: treat frozenRow: 0 as no freeze (input clamp)#2702
ghiscoding merged 1 commit into
masterfrom
fix/frozen-row-zero-clamp

Conversation

@ghiscoding

@ghiscoding ghiscoding commented Aug 7, 2026

Copy link
Copy Markdown
Owner

verified by Copilot using GPT-5.3-Codex

Port bug fix from 6pac/SlickGrid PR 6pac/SlickGrid#1266 into slickgrid-universal

The bug (Q23/Q24 in discussion 6pac/SlickGrid#1247)

frozenRow is a count, but setFrozenOptions gated on frozenRow > -1, so frozenRow: 0 activated the full frozen-row machinery around an empty band:

  • hasFrozenRows = true, split panes shown — a visible empty band strip;
  • actualFrozenRow computed to 0, so every row rendered in the bottom canvas in top mode;
  • with frozenBottom: true, actualFrozenRow = dataLength — the whole body rendered in the top canvas while bottom-mode offset math measured it (the degenerate case behind several downstream contortions).

The fix

One-line clamp: the gate is now frozenRow > 0. Zero pinned rows is no freeze. A repo-wide grep (examples/, cypress/, src/) confirms nothing passes frozenRow: 0 today, so no exercised behavior changes.

Repro

new Slick.Grid('#c', data, cols, { frozenRow: 0 }) → pre-fix: all rows live in .grid-canvas-bottom under a visible empty band; post-fix: identical to an unfrozen grid.

Test

cypress/e2e/quirk-frozen-row-zero.cy.tsself-hosting (the two-variant harness is served from within the spec via cy.intercept; the spec does not depend on any example page). Asserts both frozenRow: 0 variants are observably identical to an unfrozen grid (all rows in the top canvas, no bottom pane visible). Verified to fail pre-fix (top=0 bottom=12, phantom panes visible) and pass with the fix; frozen suites ran green as a regression gate.

⚠️ Temporary example page

examples/example-quirk-frozen-row-zero.html is a human-review repro (three grids: both variants + an unfrozen control) intended to be deleted before merge. The cypress test is fully independent of it.

(Part of the quirks-triage series — remaining-items wave: see discussion 6pac/SlickGrid#1247.)

@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.0%. Comparing base (9919580) to head (e7f1185).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff            @@
##           master    #2702     +/-   ##
=========================================
- Coverage   100.0%   100.0%   -0.0%     
=========================================
  Files         200      200             
  Lines       25502    25502             
  Branches     9019     9019             
=========================================
- Hits        25502    25497      -5     
- Misses          0        5      +5     
Flag Coverage Δ
angular 100.0% <ø> (ø)
universal 100.0% <100.0%> (-<0.1%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pkg-pr-new

pkg-pr-new Bot commented Aug 7, 2026

Copy link
Copy Markdown
angular-slickgrid

npm i https://pkg.pr.new/angular-slickgrid@2702

aurelia-slickgrid

npm i https://pkg.pr.new/aurelia-slickgrid@2702

slickgrid-react

npm i https://pkg.pr.new/slickgrid-react@2702

slickgrid-vue

npm i https://pkg.pr.new/slickgrid-vue@2702

@slickgrid-universal/angular-row-detail-plugin

npm i https://pkg.pr.new/@slickgrid-universal/angular-row-detail-plugin@2702

@slickgrid-universal/aurelia-row-detail-plugin

npm i https://pkg.pr.new/@slickgrid-universal/aurelia-row-detail-plugin@2702

@slickgrid-universal/react-row-detail-plugin

npm i https://pkg.pr.new/@slickgrid-universal/react-row-detail-plugin@2702

@slickgrid-universal/vue-row-detail-plugin

npm i https://pkg.pr.new/@slickgrid-universal/vue-row-detail-plugin@2702

@slickgrid-universal/binding

npm i https://pkg.pr.new/@slickgrid-universal/binding@2702

@slickgrid-universal/common

npm i https://pkg.pr.new/@slickgrid-universal/common@2702

@slickgrid-universal/composite-editor-component

npm i https://pkg.pr.new/@slickgrid-universal/composite-editor-component@2702

@slickgrid-universal/custom-footer-component

npm i https://pkg.pr.new/@slickgrid-universal/custom-footer-component@2702

@slickgrid-universal/custom-tooltip-plugin

npm i https://pkg.pr.new/@slickgrid-universal/custom-tooltip-plugin@2702

@slickgrid-universal/empty-warning-component

npm i https://pkg.pr.new/@slickgrid-universal/empty-warning-component@2702

@slickgrid-universal/event-pub-sub

npm i https://pkg.pr.new/@slickgrid-universal/event-pub-sub@2702

@slickgrid-universal/excel-export

npm i https://pkg.pr.new/@slickgrid-universal/excel-export@2702

@slickgrid-universal/graphql

npm i https://pkg.pr.new/@slickgrid-universal/graphql@2702

@slickgrid-universal/odata

npm i https://pkg.pr.new/@slickgrid-universal/odata@2702

@slickgrid-universal/pagination-component

npm i https://pkg.pr.new/@slickgrid-universal/pagination-component@2702

@slickgrid-universal/pdf-export

npm i https://pkg.pr.new/@slickgrid-universal/pdf-export@2702

@slickgrid-universal/row-detail-view-plugin

npm i https://pkg.pr.new/@slickgrid-universal/row-detail-view-plugin@2702

@slickgrid-universal/rxjs-observable

npm i https://pkg.pr.new/@slickgrid-universal/rxjs-observable@2702

@slickgrid-universal/sql

npm i https://pkg.pr.new/@slickgrid-universal/sql@2702

@slickgrid-universal/text-export

npm i https://pkg.pr.new/@slickgrid-universal/text-export@2702

@slickgrid-universal/utils

npm i https://pkg.pr.new/@slickgrid-universal/utils@2702

@slickgrid-universal/vanilla-bundle

npm i https://pkg.pr.new/@slickgrid-universal/vanilla-bundle@2702

@slickgrid-universal/vanilla-force-bundle

npm i https://pkg.pr.new/@slickgrid-universal/vanilla-force-bundle@2702

@slickgrid-universal/web-mcp

npm i https://pkg.pr.new/@slickgrid-universal/web-mcp@2702

commit: e7f1185

@ghiscoding
ghiscoding merged commit 6787010 into master Aug 7, 2026
12 checks passed
@ghiscoding
ghiscoding deleted the fix/frozen-row-zero-clamp branch August 7, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant