Skip to content

Conversation

@2wheeh
Copy link

@2wheeh 2wheeh commented Jan 8, 2026

🎯 Changes

resolves #1114

Adds deferLaneAssignment option to defer lane caching until items are measured via measureElement.

#1080 introduced lane assignment caching based on estimateSize for visual stability. However, this broke a core use case for masonry layouts where lane assignments should be based on actual measured sizes, not estimates.

This PR adds a new option deferLaneAssignment (default: false):

  • When false (default): Current behavior - lanes cached immediately from estimateSize
  • When true: Lanes are calculated but not cached until first measurement, then cached based on actual sizes

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

@changeset-bot
Copy link

changeset-bot bot commented Jan 8, 2026

🦋 Changeset detected

Latest commit: 7a2e014

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@tanstack/virtual-core Patch
@tanstack/angular-virtual Patch
@tanstack/lit-virtual Patch
@tanstack/react-virtual Patch
@tanstack/solid-virtual Patch
@tanstack/svelte-virtual Patch
@tanstack/vue-virtual Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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.

Lane assignments should respect measured sizes, not just estimates

1 participant