Skip to content

fix sorting replacement in single-sort mode#6431

Draft
KevinVandy wants to merge 1 commit into
betafrom
agent/fix-4309-single-sort
Draft

fix sorting replacement in single-sort mode#6431
KevinVandy wants to merge 1 commit into
betafrom
agent/fix-4309-single-sort

Conversation

@KevinVandy

Copy link
Copy Markdown
Member

What changed

  • distinguish actual multi-sort actions from single-sort actions
  • when an existing column is toggled without multi-sort, reduce the sorting state to that column
  • preserve the normal toggle/remove cycle while discarding the other multi-sort entries
  • add a regression test for toggling the last column of an existing multi-sort state

Why

toggleSorting(..., false) previously kept the other sorted columns when the target column was already the final entry. The action was classified as a toggle, and the toggle path mapped over the entire previous state.

Single-sort actions should leave at most the selected column in the sorting state, regardless of its prior position.

Validation

  • packages/table-core/tests/unit/features/row-sorting/rowSortingFeature.utils.test.ts — 47 tests passed
  • Prettier and git diff --check

Closes #4309

@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: d779aedd-95d9-4c91-8dbc-82af5b87226f

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
  • Commit unit tests in branch agent/fix-4309-single-sort

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 d2fb560

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

☁️ Nx Cloud last updated this comment at 2026-07-17 20:28:33 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@6431

@tanstack/angular-table

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

@tanstack/angular-table-devtools

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

@tanstack/ember-table

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

@tanstack/lit-table

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

@tanstack/match-sorter-utils

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

@tanstack/preact-table

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

@tanstack/preact-table-devtools

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

@tanstack/react-table

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

@tanstack/react-table-devtools

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

@tanstack/solid-table

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

@tanstack/solid-table-devtools

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

@tanstack/svelte-table

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

@tanstack/table-core

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

@tanstack/table-devtools

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

@tanstack/vue-table

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

@tanstack/vue-table-devtools

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

commit: d2fb560

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.

toggleSorting preserve the multi selection

1 participant