Skip to content

enhancement: adding firstIndex and lastIndex to virtual#979

Merged
davedbase merged 2 commits into
solidjs-community:nextfrom
davedbase:v2/add-index-virtual
Jul 7, 2026
Merged

enhancement: adding firstIndex and lastIndex to virtual#979
davedbase merged 2 commits into
solidjs-community:nextfrom
davedbase:v2/add-index-virtual

Conversation

@davedbase

Copy link
Copy Markdown
Member
  • packages/virtual/src/index.tsx: added firstIndex: numberandlastIndex: number | undefinedtoVirtualListReturn's type and the returned object. lastIndexislastIdx - 1(since slicing is exclusive) andundefined` for an empty list.
  • packages/virtual/test/index.test.tsx: added the equivalent test cases from the PR (basic values, scroll updates, overscan, bottom-of-list, empty list, singleton list), adapted to this repo's createRoot/flush test pattern for Solid 2.0.
  • Added a changeset (patch bump for @solid-primitives/virtual).

@davedbase davedbase added the enhancement New feature or request label Jul 7, 2026
@changeset-bot

changeset-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 66bd829

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

This PR includes changesets to release 1 package
Name Type
@solid-primitives/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

@davedbase davedbase changed the title enhancement:Adding firstIndex and lastIndex to virtual enhancement: adding firstIndex and lastIndex to virtual Jul 7, 2026
@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: cbde246a-f337-49f1-926e-bca1f08620ca

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ 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.

@davedbase davedbase merged commit 4fd75dd into solidjs-community:next Jul 7, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant