Skip to content

Conversation

@Ryanromaris
Copy link
Contributor

Summary

This ensures calculateRange returns a valid range when there are fewer items than lanes (including single-item virtual lists). Prevents invalid access to undefined measurements and avoids empty or broken virtual ranges.

Fixes #963

@changeset-bot
Copy link

changeset-bot bot commented Mar 24, 2025

🦋 Changeset detected

Latest commit: 6ac1e73

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 Mar 24, 2025

View your CI Pipeline Execution ↗ for commit 6ac1e73.

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

☁️ Nx Cloud last updated this comment at 2025-03-24 10:59:36 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 24, 2025

Open in Stackblitz

More templates

@tanstack/angular-virtual

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

@tanstack/lit-virtual

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

@tanstack/react-virtual

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

@tanstack/solid-virtual

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

@tanstack/svelte-virtual

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

@tanstack/vue-virtual

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

@tanstack/virtual-core

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

commit: 6ac1e73

@piecyk piecyk merged commit 51656d9 into TanStack:main Mar 24, 2025
4 checks passed
@piecyk
Copy link
Collaborator

piecyk commented Mar 24, 2025

Thanks @Ryanromaris 👏

@github-actions github-actions bot mentioned this pull request Mar 24, 2025
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.

getTotalSize() returns 0 when using multiple lanes with a single item

3 participants