Skip to content

fix(table-core): preserve clicked row in single-select mode#6429

Merged
KevinVandy merged 1 commit into
betafrom
agent/fix-single-select-subrows
Jul 17, 2026
Merged

fix(table-core): preserve clicked row in single-select mode#6429
KevinVandy merged 1 commit into
betafrom
agent/fix-single-select-subrows

Conversation

@KevinVandy

@KevinVandy KevinVandy commented Jul 17, 2026

Copy link
Copy Markdown
Member

Summary

  • prevent automatic sub-row selection when the clicked row only supports single selection
  • add a regression test covering a parent row with selectable children

Root cause

Selecting a parent recursively selected its descendants. With enableMultiRowSelection: false, each recursive descendant cleared the preceding selection, so the final leaf row replaced the parent that the user clicked.

Impact

Single-select tables now preserve the clicked parent row instead of selecting its final descendant. Existing multi-select sub-row behavior is unchanged.

Validation

  • pnpm dlx --package=vitest@4.1.9 vitest run packages/table-core/tests/unit/features/row-selection packages/table-core/tests/implementation/features/row-selection (91 tests passed)
  • Prettier check passed for the changed files
  • git diff --check

Closes #4299

Summary by CodeRabbit

  • Bug Fixes
    • Fixed row selection so selecting a parent row in single-selection mode no longer selects its child rows.
    • Ensured descendant rows are selected only when multi-row selection is allowed.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

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

Run ID: bdb6912f-6ac5-4994-a47a-752c09e80d18

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:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/fix-single-select-subrows

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 17, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit d85c069

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

☁️ Nx Cloud last updated this comment at 2026-07-17 18:34:22 UTC

@pkg-pr-new

pkg-pr-new Bot commented Jul 17, 2026

Copy link
Copy Markdown
More templates

@tanstack/alpine-table

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

@tanstack/angular-table

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

@tanstack/angular-table-devtools

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

@tanstack/ember-table

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

@tanstack/lit-table

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

@tanstack/match-sorter-utils

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

@tanstack/preact-table

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

@tanstack/preact-table-devtools

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

@tanstack/react-table

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

@tanstack/react-table-devtools

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

@tanstack/solid-table

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

@tanstack/solid-table-devtools

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

@tanstack/svelte-table

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

@tanstack/table-core

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

@tanstack/table-devtools

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

@tanstack/vue-table

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

@tanstack/vue-table-devtools

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

commit: d85c069

@KevinVandy
KevinVandy marked this pull request as ready for review July 17, 2026 19:34
@KevinVandy
KevinVandy merged commit a4040a2 into beta Jul 17, 2026
9 checks passed
@KevinVandy
KevinVandy deleted the agent/fix-single-select-subrows branch July 17, 2026 20:04
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.

[v8] When multi row selection is disabled and sub rows are used sometimes a wrong row is selected

1 participant