Skip to content

Conversation

@shunn2
Copy link
Contributor

@shunn2 shunn2 commented Dec 16, 2025

…ynamically

🎯 Changes

Fixes issue where changing lane count dynamically causes layout breakage with items retaining old lane numbers, resulting in out-of-bounds errors in responsive masonry layouts.

After clearing measurements cache on lane change, the virtualizer was incorrectly restoring from initialMeasurementsCache which contained stale lane assignments.

Added check to skip initialMeasurementsCache restoration during lane transitions using the lanesSettling flag.

Related Issue: #1063

✅ 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 Dec 16, 2025

🦋 Changeset detected

Latest commit: 011c9b9

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

@nx-cloud
Copy link

nx-cloud bot commented Dec 16, 2025

View your CI Pipeline Execution ↗ for commit 011c9b9

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 2m 7s View ↗
nx run-many --target=build --exclude=examples/** ✅ Succeeded 15s View ↗

☁️ Nx Cloud last updated this comment at 2025-12-16 16:02:00 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 16, 2025

More templates

@tanstack/angular-virtual

npm i https://pkg.pr.new/@tanstack/angular-virtual@1095

@tanstack/lit-virtual

npm i https://pkg.pr.new/@tanstack/lit-virtual@1095

@tanstack/react-virtual

npm i https://pkg.pr.new/@tanstack/react-virtual@1095

@tanstack/solid-virtual

npm i https://pkg.pr.new/@tanstack/solid-virtual@1095

@tanstack/svelte-virtual

npm i https://pkg.pr.new/@tanstack/svelte-virtual@1095

@tanstack/virtual-core

npm i https://pkg.pr.new/@tanstack/virtual-core@1095

@tanstack/vue-virtual

npm i https://pkg.pr.new/@tanstack/vue-virtual@1095

commit: 011c9b9

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