Skip to content

fix: allow zero viewport height with string row heights - #12

Merged
fastfrwrd merged 1 commit into
chore/sync-comcast-upstreamfrom
fix/string-rowheight-unmeasured
Sep 22, 2026
Merged

fastfrwrd merged 1 commit into
chore/sync-comcast-upstreamfrom
fix/string-rowheight-unmeasured

Conversation

@fastfrwrd

Copy link
Copy Markdown

Ports the fix from https://github.com/grafana/react-data-grid-patches/pull/2 into this fork. String row heights now accept a zero viewport height instead of throwing, using gridHeight ?? 0 for the total row height.

Unlike the source repository, this branch initializes dimensions to 1. The crash still occurs when layout measures a zero-height viewport, such as a hidden grid. The regression test mounts an auto-height grid in a zero-height viewport, then resizes it and verifies that rows still render.

Based on #7 (chore/sync-comcast-upstream), which introduces the required string row-height support; main does not have it yet. Merge this into that branch before #7, or retarget to main after #7 merges. No generated distribution patch is needed in this source repository.

Validation:

  • New regression fails with the original error in both Chromium and Firefox before the fix.
  • All 28 row-height tests pass across Chromium and Firefox with the fix (Node 26.1.0).
  • Typecheck, ESLint, and formatting pass. Library build passes with ecij sourcemap warnings.
  • Full browser/Node suite: 362 passed, 2 skipped, 3 Chromium sorting failures. The same three failures reproduce with the unchanged base implementation: multi column sort, sortPriority defined using both contexts, and sortPriority defined using both contexts and renderers.

@fastfrwrd
fastfrwrd requested a review from a team as a code owner September 21, 2026 22:26
@fastfrwrd
fastfrwrd requested review from adela-almasan, gelicia and leeoniya and removed request for a team September 21, 2026 22:26
@fastfrwrd
fastfrwrd merged commit 68652d3 into chore/sync-comcast-upstream Sep 22, 2026
8 checks passed
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