Skip to content

docs(table-core): correct getIsSome*Selected JSDoc to at-least-one se… - #6478

Merged
KevinVandy merged 2 commits into
TanStack:betafrom
dfedoryshchev:docs/get-is-some-selected-jsdoc
Jul 31, 2026
Merged

docs(table-core): correct getIsSome*Selected JSDoc to at-least-one se…#6478
KevinVandy merged 2 commits into
TanStack:betafrom
dfedoryshchev:docs/get-is-some-selected-jsdoc

Conversation

@dfedoryshchev

@dfedoryshchev dfedoryshchev commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Changes

getIsSomeRowsSelected() and getIsSomePageRowsSelected() are documented as "partial" selection checks, which is the v8 meaning. In v9 both return true whenever at least one row is selected, including when every row is selected.

table_getIsSomeRowsSelected delegates to table_getSelectedRowIds, i.e. Object.keys(state.rowSelection).length > 0, so it is neither scoped to filtered rows nor "partial". table_getIsSomePageRowsSelected has no !getIsAllPageRowsSelected() guard, so a fully selected page also returns true.

That behaviour is the intended one: the migration guide says these "now mean at least one, including the all-selected case. They no longer mean 'some but not all.'", and the unit tests assert it. Only the JSDoc kept the old wording, and its own second sentence ("The result is true when at least one row id is selected") already contradicted its summary.

The generated reference pages carry the same sentences, so they are updated alongside.

Checklist

Summary by CodeRabbit

  • Documentation
    • Clarified row-selection status descriptions.
    • Documented that page-level selection is reported when at least one selectable row on the current page is selected.
    • Clarified that overall selection remains true whenever any row ID is selected, including when all rows are selected.

…mantics

`getIsSomeRowsSelected` and `getIsSomePageRowsSelected` were still documented
as "partial" selection checks, which is the v8 meaning. In v9 they return true
whenever at least one row is selected, including when all of them are.

`table_getIsSomeRowsSelected` also reads `state.rowSelection` rather than the
filtered row model, so "across filtered rows" was inaccurate as well.

The generated reference pages carry the same sentences, so they are updated
alongside the JSDoc.
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

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 Plus

Run ID: d48b54af-2904-4928-957d-b5cc03b89352

📥 Commits

Reviewing files that changed from the base of the PR and between d66b39f and 9f641f9.

📒 Files selected for processing (5)
  • docs/reference/index/interfaces/Table_RowSelection.md
  • docs/reference/static-functions/functions/table_getIsSomePageRowsSelected.md
  • docs/reference/static-functions/functions/table_getIsSomeRowsSelected.md
  • packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts
  • packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts

📝 Walkthrough

Walkthrough

Changes

Row selection documentation

Layer / File(s) Summary
Row-selection API documentation
packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts, packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts
Clarified that the helpers detect selected row IDs and selectable selected rows on the current page.
Generated reference documentation
docs/reference/index/interfaces/Table_RowSelection.md, docs/reference/static-functions/functions/*
Updated reference descriptions to match the clarified helper behavior.

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

Suggested reviewers: kevinvandy

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the table-core JSDoc correction for the getIsSome*Selected APIs.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check 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-cloud Bot commented Jul 31, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 4a76a33

Command Status Duration Result
nx affected --targets=test:eslint,test:sherif,t... ✅ Succeeded 8m 10s View ↗
nx run-many --targets=build --exclude=examples/** ✅ Succeeded 57s View ↗

☁️ Nx Cloud last updated this comment at 2026-07-31 19:54:45 UTC

@pkg-pr-new

pkg-pr-new Bot commented Jul 31, 2026

Copy link
Copy Markdown
More templates

@tanstack/alpine-table

npm i https://pkg.pr.new/TanStack/table/@tanstack/alpine-table@6478

@tanstack/angular-table

npm i https://pkg.pr.new/TanStack/table/@tanstack/angular-table@6478

@tanstack/angular-table-devtools

npm i https://pkg.pr.new/TanStack/table/@tanstack/angular-table-devtools@6478

@tanstack/ember-table

npm i https://pkg.pr.new/TanStack/table/@tanstack/ember-table@6478

@tanstack/lit-table

npm i https://pkg.pr.new/TanStack/table/@tanstack/lit-table@6478

@tanstack/match-sorter-utils

npm i https://pkg.pr.new/TanStack/table/@tanstack/match-sorter-utils@6478

@tanstack/octane-table

npm i https://pkg.pr.new/TanStack/table/@tanstack/octane-table@6478

@tanstack/preact-table

npm i https://pkg.pr.new/TanStack/table/@tanstack/preact-table@6478

@tanstack/preact-table-devtools

npm i https://pkg.pr.new/TanStack/table/@tanstack/preact-table-devtools@6478

@tanstack/react-table

npm i https://pkg.pr.new/TanStack/table/@tanstack/react-table@6478

@tanstack/react-table-devtools

npm i https://pkg.pr.new/TanStack/table/@tanstack/react-table-devtools@6478

@tanstack/solid-table

npm i https://pkg.pr.new/TanStack/table/@tanstack/solid-table@6478

@tanstack/solid-table-devtools

npm i https://pkg.pr.new/TanStack/table/@tanstack/solid-table-devtools@6478

@tanstack/svelte-table

npm i https://pkg.pr.new/TanStack/table/@tanstack/svelte-table@6478

@tanstack/table-core

npm i https://pkg.pr.new/TanStack/table/@tanstack/table-core@6478

@tanstack/table-devtools

npm i https://pkg.pr.new/TanStack/table/@tanstack/table-devtools@6478

@tanstack/vue-table

npm i https://pkg.pr.new/TanStack/table/@tanstack/vue-table@6478

@tanstack/vue-table-devtools

npm i https://pkg.pr.new/TanStack/table/@tanstack/vue-table-devtools@6478

commit: 4a76a33

@KevinVandy
KevinVandy merged commit ba53bca into TanStack:beta Jul 31, 2026
9 checks passed
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.

2 participants