Skip to content

docs(virtual-core): clarify shouldAdjustScrollPositionOnItemSizeChange usage - #1234

Merged
piecyk merged 1 commit into
TanStack:mainfrom
xianjianlf2:codex/docs-clarify-should-adjust-scroll-position
Jul 22, 2026
Merged

docs(virtual-core): clarify shouldAdjustScrollPositionOnItemSizeChange usage#1234
piecyk merged 1 commit into
TanStack:mainfrom
xianjianlf2:codex/docs-clarify-should-adjust-scroll-position

Conversation

@xianjianlf2

@xianjianlf2xianjianlf2 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Clarifies that shouldAdjustScrollPositionOnItemSizeChange is a Virtualizer instance property, not a VirtualizerOptions option.

The existing docs already list it under Virtualizer Instance, but the prose and changelog wording could still be read as passing the predicate through options. This updates both places to show the intended imperative assignment form.

References #1227 and follows up on the maintainer feedback in #1232.

Validation:

  • ./node_modules/.bin/prettier --check docs/api/virtualizer.md packages/virtual-core/CHANGELOG.md

Summary by CodeRabbit

  • Documentation
    • Clarified that shouldAdjustScrollPositionOnItemSizeChange is configured directly on the virtualizer instance.
    • Added an example demonstrating how to assign the callback after creating a virtualizer.
    • Updated the changelog to accurately describe the instance-level override behavior.

@coderabbitai

coderabbitaiBot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5f070252-6e00-4f57-9b4d-ca41ceb5676a

📥 Commits

Reviewing files that changed from the base of the PR and between 1e3b908 and dff54b7.

📒 Files selected for processing (2)
  • docs/api/virtualizer.md
  • packages/virtual-core/CHANGELOG.md

📝 Walkthrough

Walkthrough

The documentation and changelog clarify that shouldAdjustScrollPositionOnItemSizeChange is assigned directly on the virtualizer instance rather than provided as a construction option.

Changes

Callback documentation clarification

Layer / File(s)Summary
Document instance property assignment
docs/api/virtualizer.md, packages/virtual-core/CHANGELOG.md
The API documentation adds direct-assignment guidance and an example, while the 3.15.0 changelog clarifies that the instance callback is checked before default behavior.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

Suggested reviewers:piecyk, tannerlinsley

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Description check⚠️ WarningThe description covers the change and validation, but it omits the required template sections for Checklist and Release Impact.Add the ## ✅ Checklist and ## 🚀 Release Impact sections, including the required checkboxes, to match the repository template.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Title check✅ PassedThe title is concise and accurately summarizes the docs-only clarification to shouldAdjustScrollPositionOnItemSizeChange.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nx-cloud

nx-cloudBot commented Jul 20, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit dff54b7

CommandStatusDurationResult
nx affected --targets=test:sherif,test:knip,tes...✅ Succeeded3mView ↗
nx run-many --target=build --exclude=examples/**✅ Succeeded19sView ↗

☁️ Nx Cloud last updated this comment at 2026-07-20 15:57:42 UTC

@pkg-pr-new

Copy link
Copy Markdown
More templates

@tanstack/angular-virtual

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

@tanstack/lit-virtual

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

@tanstack/marko-virtual

npm i https://pkg.pr.new/@tanstack/marko-virtual@1234

@tanstack/react-virtual

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

@tanstack/solid-virtual

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

@tanstack/svelte-virtual

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

@tanstack/virtual-core

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

@tanstack/vue-virtual

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

commit: dff54b7

@piecyk
piecyk merged commit ef6e92a into TanStack:mainJul 22, 2026
10 checks passed
Sign up for freeto 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.

2 participants

@xianjianlf2@piecyk