Skip to content

fix: add missing column order memo deps#6293

Merged
KevinVandy merged 1 commit into
alphafrom
fix-column-order-memoDeps
Jun 4, 2026
Merged

fix: add missing column order memo deps#6293
KevinVandy merged 1 commit into
alphafrom
fix-column-order-memoDeps

Conversation

@KevinVandy
Copy link
Copy Markdown
Member

@KevinVandy KevinVandy commented Jun 4, 2026

🎯 Changes

✅ Checklist

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

Summary by CodeRabbit

  • Bug Fixes
    • Fixed an issue where pinned columns were not properly updating when the column order changed.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 4, 2026

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: d118c7a4-2f17-4483-b8de-1a9eb8076f48

📥 Commits

Reviewing files that changed from the base of the PR and between 954104c and ae0032f.

📒 Files selected for processing (2)
  • packages/table-core/src/features/column-pinning/columnPinningFeature.ts
  • packages/table-core/tests/unit/features/column-pinning/columnPinningFeature.utils.test.ts

📝 Walkthrough

Walkthrough

This PR fixes a cache invalidation issue in the column pinning feature. Memoized selectors for leaf columns and visible leaf columns now depend on column order, ensuring they recompute when column order changes. A test case validates that center-visible leaf columns and positional indices update correctly when columns are reordered.

Changes

Column Pinning Memoization Dependencies

Layer / File(s) Summary
Memoization dependency updates for column pinning selectors
packages/table-core/src/features/column-pinning/columnPinningFeature.ts
memoDeps arrays for left/right/center leaf column selectors and left/center/right visible leaf column selectors are extended to include table.atoms.columnOrder?.get(), ensuring cached results invalidate when column order changes.
Test import and validation for column order updates
packages/table-core/tests/unit/features/column-pinning/columnPinningFeature.utils.test.ts
Test file imports generateTestTableWithDataAndState and adds a unit test verifying that table.getCenterVisibleLeafColumns() and the getStart('center') position for a column update correctly when table.setColumnOrder() changes column ordering.

Estimated Code Review Effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A rabbit hops through cached deps with glee,
When columns dance, now memos set them free!
Order matters, and the cache agrees—
Fresh selectors bloom like spring-time trees. 🌱✨

🚥 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 PR title 'fix: add missing column order memo deps' directly and clearly describes the main change: adding missing column order dependencies to memoization lists in column pinning feature.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 fix-column-order-memoDeps

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 and usage tips.

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Jun 4, 2026

View your CI Pipeline Execution ↗ for commit ae0032f

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

☁️ Nx Cloud last updated this comment at 2026-06-04 17:10:04 UTC

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Jun 4, 2026

More templates

@tanstack/angular-table

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

@tanstack/angular-table-devtools

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

@tanstack/lit-table

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

@tanstack/match-sorter-utils

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

@tanstack/preact-table

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

@tanstack/preact-table-devtools

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

@tanstack/react-table

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

@tanstack/react-table-devtools

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

@tanstack/solid-table

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

@tanstack/solid-table-devtools

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

@tanstack/svelte-table

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

@tanstack/table-core

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

@tanstack/table-devtools

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

@tanstack/vue-table

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

@tanstack/vue-table-devtools

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

commit: ae0032f

@KevinVandy KevinVandy merged commit 0ba7539 into alpha Jun 4, 2026
8 checks passed
@KevinVandy KevinVandy deleted the fix-column-order-memoDeps branch June 4, 2026 17:13
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