Skip to content

refactor(table-core): remove SyntheticEvent persist() calls#6448

Merged
KevinVandy merged 1 commit into
TanStack:betafrom
conao3:remove-synthetic-event-persist
Jul 24, 2026
Merged

refactor(table-core): remove SyntheticEvent persist() calls#6448
KevinVandy merged 1 commit into
TanStack:betafrom
conao3:remove-synthetic-event-persist

Conversation

@conao3

@conao3 conao3 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

🎯 Changes

Removes the (e as any).persist?.() calls from the sorting, expanding, resizing, and selection event handlers, plus the JSDoc / generated reference docs that described them.

persist() was a workaround for React's SyntheticEvent pooling, which was removed in React 17 (the method has been a deprecated no-op since then). v9 requires react >= 18, so these calls can't do anything anymore. Dropping them also removes 4 as any casts from table-core.

References:

✅ Checklist

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

Assisted-by: Claude Code:claude-fable-5

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Handlers for row selection, row expansion, sorting, and column resizing no longer call optional event.persist() methods. Documentation and tests were updated to remove persistence-specific statements and assertions.

Changes

Synthetic event persistence removal

Layer / File(s) Summary
Row selection event handling
packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts, packages/table-core/tests/implementation/features/row-selection/rowSelectionRange.test.ts, docs/reference/static-functions/functions/row_getToggleSelectedHandler.md
Row selection reads target.checked without persisting the event, and the persistence-specific test and documentation are removed.
Expansion and sorting toggle handlers
packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts, packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts, packages/table-core/tests/unit/features/row-expanding/*, packages/table-core/tests/unit/features/row-sorting/*, docs/reference/static-functions/functions/table_getToggleAllRowsExpandedHandler.md, docs/reference/static-functions/functions/column_getToggleSortingHandler.md
Expansion and sorting handlers no longer persist events; tests now assert state updates without persistence checks.
Column resize event handling
packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts
The resize-start handler no longer invokes optional event persistence.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: kevinvandy

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: removing SyntheticEvent persist() calls from table-core.
✨ 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 24, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 3e74221

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

☁️ Nx Cloud last updated this comment at 2026-07-24 15:53:31 UTC

@pkg-pr-new

pkg-pr-new Bot commented Jul 24, 2026

Copy link
Copy Markdown
More templates

@tanstack/alpine-table

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

@tanstack/angular-table

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

@tanstack/angular-table-devtools

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

@tanstack/ember-table

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

@tanstack/lit-table

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

@tanstack/match-sorter-utils

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

@tanstack/preact-table

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

@tanstack/preact-table-devtools

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

@tanstack/react-table

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

@tanstack/react-table-devtools

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

@tanstack/solid-table

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

@tanstack/solid-table-devtools

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

@tanstack/svelte-table

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

@tanstack/table-core

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

@tanstack/table-devtools

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

@tanstack/vue-table

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

@tanstack/vue-table-devtools

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

commit: 3e74221

@KevinVandy
KevinVandy merged commit 813f573 into TanStack:beta Jul 24, 2026
9 checks passed
@conao3

conao3 commented Jul 25, 2026

Copy link
Copy Markdown
Contributor Author

Thanks!

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