Skip to content

feat: improve getGroupingValue#6351

Merged
KevinVandy merged 1 commit into
betafrom
getGroupingValue
Jun 26, 2026
Merged

feat: improve getGroupingValue#6351
KevinVandy merged 1 commit into
betafrom
getGroupingValue

Conversation

@KevinVandy

@KevinVandy KevinVandy commented Jun 26, 2026

Copy link
Copy Markdown
Member

🎯 Changes

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm test:pr.

Summary by CodeRabbit

  • New Features

    • Expanded column grouping customization to provide more context when calculating grouping values, including the row index and row instance.
    • Grouping now falls back to the column’s accessor value when no custom grouping value is supplied.
  • Tests

    • Added coverage for custom grouping value behavior and verified grouped results are returned in the expected order.

@coderabbitai

coderabbitai Bot commented Jun 26, 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

Run ID: 5d11cb52-fae7-4814-9dd0-b40e074801cb

📥 Commits

Reviewing files that changed from the base of the PR and between 4be62f6 and 2aac008.

📒 Files selected for processing (3)
  • packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts
  • packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts
  • packages/table-core/tests/implementation/features/column-grouping/columnGroupingFeature.test.ts

📝 Walkthrough

Walkthrough

The column-grouping callback now receives the original row, row index, and row instance when computing grouping values. The public type, implementation, and test coverage were updated to match the new call shape.

Changes

Column grouping callback arguments

Layer / File(s) Summary
Callback contract and invocation
packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts, packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts
getGroupingValue accepts the original row, row index, and row instance, and the grouping utility forwards those values when computing grouping keys.
Grouping callback test
packages/table-core/tests/implementation/features/column-grouping/columnGroupingFeature.test.ts
The new grouping test suite captures callback arguments and asserts the grouped bucket row model output.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

I twitched my nose and hopped along,
New grouping keys now sing their song.
With row and index in the mix,
The buckets line up, neat and quick.
🐰✨ Hop-hop—sorted, calm, and bright!

🚥 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 matches the main change by calling out the getGroupingValue improvement.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch getGroupingValue

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 Jun 26, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 2aac008

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

☁️ Nx Cloud last updated this comment at 2026-06-26 14:01:23 UTC

@pkg-pr-new

pkg-pr-new Bot commented Jun 26, 2026

Copy link
Copy Markdown
More templates

@tanstack/angular-table

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

@tanstack/angular-table-devtools

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

@tanstack/lit-table

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

@tanstack/match-sorter-utils

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

@tanstack/preact-table

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

@tanstack/preact-table-devtools

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

@tanstack/react-table

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

@tanstack/react-table-devtools

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

@tanstack/solid-table

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

@tanstack/solid-table-devtools

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

@tanstack/svelte-table

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

@tanstack/table-core

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

@tanstack/table-devtools

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

@tanstack/vue-table

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

@tanstack/vue-table-devtools

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

commit: 2aac008

@KevinVandy KevinVandy merged commit 197fd75 into beta Jun 26, 2026
8 checks passed
@KevinVandy KevinVandy deleted the getGroupingValue branch June 26, 2026 14:02
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.

1 participant