Skip to content

feat: build the footer row lazily when createFooterRow is enabled at runtime - #2707

Open
ghiscoding wants to merge 1 commit into
masterfrom
feat/runtime-footer-row-enable
Open

feat: build the footer row lazily when createFooterRow is enabled at runtime#2707
ghiscoding wants to merge 1 commit into
masterfrom
feat/runtime-footer-row-enable

Conversation

@ghiscoding

Copy link
Copy Markdown
Owner

verified by Copilot using GPT-5.3-Codex

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

⚠️ Merge order: this PR assumes 6pac/SlickGrid#1266 and 6pac/SlickGrid#1267 are merged first (and pairs naturally with 6pac/SlickGrid#1268). It has no textual conflicts with them, but it was authored and validated against a master that includes them — please land those before this one.

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

Footer-row DOM was built only in the init path, and internal_setOptions never created it — so setOptions({ createFooterRow: true }) on a live grid flowed into setColumnscreateColumnFooter, dereferenced the undefined _footerRowL, and threw, leaving the grid with a half-mutated options state.

The change (the 'support it' resolution from the triage)

internal_setOptions now materializes the footer DOM when the flag flips true. materializeFooterRow() mirrors the init construction (R-before-L scroller order, spacers, columns containers, hidden when !showFooterRow) and binds the footer contextmenu/click/scroll handlers on an already-initialized grid. It runs before setScroller (which selects the footer scroll container) and before setColumns (which populates footer cells), so the existing pipeline completes the job with no further special-casing.

Runtime disable hides the footer rather than destroying it — symmetric with showFooterRow — and setFooterRowVisibility works on a runtime-built footer exactly as on an init-built one.

Test

cypress/e2e/quirk-runtime-footer-enable.cy.tsself-hosting (harness via cy.intercept; no example-page dependency). Enable on a live grid → no throw, scrollers visible, one footer cell and one onFooterRowCellRendered per column, getFooterRow() returns the element, setFooterRowVisibility(false) hides it. Verified to fail pre-fix (TypeError: Cannot read properties of undefined) and pass with the fix; footer + composite-editor + frozen suites ran 27/27 as a regression gate.

One review note: an earlier draft asserted setOptions({ showFooterRow: false }) hides the footer — dropped because master never supported visibility toggling via setOptions for init-built footers either; setFooterRowVisibility is the supported API and is what the spec exercises.

⚠️ Temporary example page

examples/example-quirk-runtime-footer-enable.html is a human-review repro (enable + toggle buttons with a live readout) intended to be deleted before merge — the cypress test is fully independent of it.

(Quirks-triage remaining-items wave: see discussion 6pac/SlickGrid#1247; siblings 6pac/SlickGrid#1266, 6pac/SlickGrid#1267, 6pac/SlickGrid#1268)

@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 (9813849) to head (893adaf).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2707   +/-   ##
=======================================
  Coverage   100.0%   100.0%           
=======================================
  Files         200      200           
  Lines       25503    25520   +17     
  Branches     9020     9027    +7     
=======================================
+ Hits        25503    25520   +17     
Flag Coverage Δ
angular 100.0% <ø> (ø)
universal 100.0% <100.0%> (ø)

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@2707

aurelia-slickgrid

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

slickgrid-react

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

slickgrid-vue

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

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

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

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

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

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

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

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

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

@slickgrid-universal/binding

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

@slickgrid-universal/common

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

@slickgrid-universal/composite-editor-component

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

@slickgrid-universal/custom-footer-component

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

@slickgrid-universal/custom-tooltip-plugin

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

@slickgrid-universal/empty-warning-component

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

@slickgrid-universal/event-pub-sub

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

@slickgrid-universal/excel-export

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

@slickgrid-universal/graphql

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

@slickgrid-universal/odata

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

@slickgrid-universal/pagination-component

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

@slickgrid-universal/pdf-export

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

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

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

@slickgrid-universal/rxjs-observable

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

@slickgrid-universal/sql

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

@slickgrid-universal/text-export

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

@slickgrid-universal/utils

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

@slickgrid-universal/vanilla-bundle

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

@slickgrid-universal/vanilla-force-bundle

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

@slickgrid-universal/web-mcp

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

commit: 893adaf

@ghiscoding ghiscoding added the AI label Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant