fix: react adapter sync state #6458
beta fromrefs/pull/6458/head·merged by KevinVandy Summary#
This PR fixes React render-phase updates when using controlled table state, as reported in #6450.
The core idea is to separate two operations that previously happened together:
- Reading the latest table options and controlled state during React render.
- Publishing that state into the reactive atom graph after React commits.
Previously, useTable called setOptions() during render, and setOptions() immediately synchronized controlled state into writable base atoms. Updating those atoms synchronously notified table.store, which could call React’s external-store listener while another render was still in progress:
React render
-> table.setOptions()
-> controlled state copied into base atom
-> table.store synchronously notifies React
-> React schedules an update during render
-> "Cannot update a component while rendering a different component"
The new flow keeps render reads synchronous and current, but defers reactive publication until the React layout/commit phase.
Goals#
The implementation is intended to support all of the following cases:
- Controlled state passed through
options.state. - External atoms passed through
options.atoms. - Internal/uncontrolled table state.
- Per-slice ownership changes between controlled and internal state.
- External atoms without requiring an additional outer
useSelector. - Root-level state selectors without redundant React renders.
- Isolated
table.Subscribeconsumers. - Stable
getSnapshot()references. - React Strict Mode.
- Rapid consecutive updates.
- Controlled objects recreated on every render.
- Suspended renders that must not publish uncommitted state.
- Backward compatibility for non-React adapters and existing static APIs.
State ownership model#
Each state slice now resolves using the documented precedence:
options.atoms[key]
> own options.state[key]
> baseAtoms[key]
The check against options.state is an own-property check rather than a truthiness check. This distinguishes a missing controlled slice from a slice explicitly owned by the controlled state object.
flowchart TD
A[Read table state slice] --> B{External atom configured?}
B -- Yes --> C[Read and return external atom]
B -- No --> D[Read base atom to retain reactive dependency]
D --> E{options.state owns this key?}
E -- Yes --> F[Return controlled render value]
E -- No --> G[Return base atom value]
C --> H[Stable live slice snapshot]
F --> H
G --> H
H --> I[Shallow-stable aggregate table.store]
I --> J[React selector gate]
The base or external atom is still read before resolving controlled state. This keeps the readonly atom connected to its reactive owner even while the controlled value currently wins.
Implementation#
1. Live readonly atoms in the React adapter#
React table options are plain values updated during render. They are not themselves reactive dependencies, so a normal computed atom cannot know that options.state changed.
The React createReadonlyAtom implementation therefore returns a small live facade:
get()evaluates the resolver against the latest render-time options.- The result is cached using the configured comparator.
- Repeated reads return a stable reference when the result is semantically unchanged.
- A hidden computed atom owns the real subscription.
- The hidden computed tracks normal atom dependencies plus a React commit atom.
Conceptually:
const getSnapshot = () => {
const next = computeFromCurrentOptions()
if (!hasSnapshot || !compare(snapshot, next)) {
snapshot = next
}
return snapshot
}
const reactiveAtom = createAtom(() => {
commitAtom.get()
return getSnapshot()
})
This gives us two complementary behaviors:
- Render-time getters always see the current controlled options.
- Subscribers are invalidated only by real reactive writes or by a React commit.
2. Render phase: update options without publishing atoms#
useTable now updates the table options using:
table_setOptions(table, updater, {
syncExternalState: false,
})
This keeps all options current during render but explicitly prevents setOptions() from synchronizing controlled state into base atoms at that point.
As a result, during the render that receives a new controlled value:
table.options.statecontains the new value.table.atoms.<slice>.get()returns the new value.table.store.get()returns the new value.table.statereturns the selected new value.- Row models can use the new value.
- No writable atom is updated.
- No store subscriber is notified during render.
3. Commit phase: publish the captured state#
After React commits, an isomorphic layout effect publishes the controlled state captured by that render:
reactivity.batch(() => {
table_syncExternalStateToBaseAtoms(
table,
capturedControlledState,
shallow,
)
reactivity.commit()
})
Using the captured state is important. The synchronization must represent the render that actually committed, rather than rereading a potentially newer mutable table.options object.
The operation is batched so that:
- Controlled slices are mirrored into base atoms.
- Semantically equal slices do not cause redundant writes.
- The React commit atom invalidates readonly atoms.
- Subscribers observe one coherent snapshot.
- Isolated subscribers can update before paint.
The explicit commit invalidation also handles option-only changes where no base atom write occurs, such as releasing ownership of a controlled slice.
4. Root selector filtering#
The public table.store must continue notifying its subscribers after a commit. This is required for consumers such as:
<table.Subscribe selector={(state) => state.pagination.pageIndex}>
{(pageIndex) => <span>{pageIndex}</span>}
</table.Subscribe>
However, the root useTable component has already rendered the new controlled value. Forwarding the same publication to React’s root external-store listener would be redundant.
useTableSelector wraps the existing TanStack Store useSelector; it does not reimplement useSyncExternalStoreWithSelector.
It records the selector and selected snapshot that React actually committed. When the public store later publishes:
if (!compare(committedSelection, nextSelection)) {
onStoreChange(nextState)
}
Therefore:
- Public store subscribers still receive the update.
- Isolated
table.Subscribecomponents can update. - The root React listener is skipped when the committed selection already matches.
- Controlled updates produce only the render caused by the controlling React state.
- Unrelated store changes do not call the root listener when the selected result is unchanged.
Hook ordering is intentional:
useTableSelectorrecords the committed root selection in its layout effect.useTablepublishes the atom graph in its following layout effect.- The filtered root subscription can compare against the correct committed selection.
5. Stable aggregate snapshots#
The aggregate table.store readonly atom uses shallow comparison.
This is necessary because building the full table state creates a new object. Without snapshot caching, React could observe a different object reference on every getSnapshot() call and report:
The result of getSnapshot should be cached to avoid an infinite loop
The store snapshot changes only when at least one resolved slice changes shallowly.
Controlled update sequence#
The following sequence uses:
C0: previously committed controlled state.C1: next controlled state received by React.B0: previous base atom value.
sequenceDiagram
autonumber
participant E as Table event
participant R as React owner
participant U as useTable
participant O as table.options
participant S as live table.store
participant X as root useTableSelector
participant B as base atoms
participant C as commit atom
participant I as isolated Subscribe
E->>R: onPaginationChange(updater)
R->>U: render with controlled C1
U->>O: table_setOptions(syncExternalState: false)
Note over U,O: Options change during render<br/>No writable atom update
U->>S: get current snapshot
S->>B: read B0 to retain dependency
Note over S: Resolve external atom<br/>then controlled C1<br/>then base B0
S-->>X: stable snapshot containing C1
X-->>U: selected C1
U-->>R: table.state, atoms and row models use C1
R->>R: commit UI for C1
Note over X,U: Layout phase after commit
X->>X: record committed selection C1
U->>B: mirror captured C1, shallow-gated
U->>C: increment commit version
Note over U,C: Batched publication
B-->>S: invalidate reactive dependencies
C-->>S: invalidate option-dependent readonly atoms
S->>I: publish committed snapshot C1
S->>X: publish committed snapshot C1
X->>X: compare next C1 with committed C1
Note over X: Equal selection<br/>skip root onStoreChange
I->>I: rerender only if its selector changed
Supported scenarios#
| Scenario | State source | Expected behavior |
|---|---|---|
| Internal/uncontrolled state | baseAtoms[key] | Table APIs update the base atom and notify subscribers immediately. The root rerenders only if its selected value changes. |
| Controlled state | options.state[key] | The current render reads the controlled value immediately. Base synchronization and subscriber notification happen only after commit. |
| External atom | options.atoms[key] | The table subscribes internally to the atom. No outer React useSelector is required. |
| External atom and controlled state for the same slice | External atom | The external atom wins. Controlled state does not override the slice resolver. |
| Controlled → internal ownership | Base atom | After ownership is released, the current base value becomes visible. Commit invalidation wakes memoized or isolated subscribers even if no new base write occurs. |
| Internal → controlled ownership | Controlled state | The controlled value is visible in the same React render without waiting for atom synchronization. |
| Unselected slice changes | Any source | The public store may update, but the root selector does not rerender or forward onStoreChange when its selected result is unchanged. |
| Recreated controlled objects | Controlled state | Shallow comparison suppresses equivalent base writes and prevents maximum-depth loops. |
| Rapid controlled updates | Controlled state | React resolves the final controlled value; committed publication brings isolated subscribers to the same final snapshot. |
| Strict Mode | Controlled state | Repeated render/effect execution remains idempotent and comparator-gated. |
| Suspended render | Controlled state | Render-time reads can evaluate the WIP value, but base atoms are not mutated and store subscribers are not notified because no commit effect runs. |
API changes#
table_setOptions#
The function accepts an optional final configuration argument:
table_setOptions(table, updater, {
syncExternalState: false,
})
The default remains unchanged:
table_setOptions(table, updater)
continues to synchronize external state immediately. This preserves existing behavior for core and other adapters.
table_syncExternalStateToBaseAtoms#
The function can now receive:
- An explicit state snapshot.
- An optional comparator.
table_syncExternalStateToBaseAtoms(
table,
capturedState,
shallow,
)
Passing an explicit snapshot allows React to publish the state associated with a specific committed render.
The implementation distinguishes:
table_syncExternalStateToBaseAtoms(table)
from:
table_syncExternalStateToBaseAtoms(table, undefined)
The first form reads table.options.state. The second intentionally publishes no controlled state. This prevents an explicitly captured undefined value from accidentally falling back to a newer mutable options object.
Usage examples#
Controlled React state#
function App() {
const [pagination, setPagination] = React.useState({
pageIndex: 0,
pageSize: 10,
})
const table = useTable(
{
data,
columns,
features,
state: {
pagination,
},
onPaginationChange: setPagination,
},
(state) => state.pagination,
)
return (
<>
<div>Page {table.state.pageIndex + 1}</div>
<button onClick={() => table.nextPage()}>Next</button>
</>
)
}
The first and subsequent pagination updates now:
- Render the correct controlled state.
- Produce the correct paginated row model.
- Do not synchronously update the atom graph during render.
- Do not produce the React render-phase warning.
- Do not cause a redundant root render after commit.
External atom without an outer subscription#
function App() {
const paginationAtom = useCreateAtom({
pageIndex: 0,
pageSize: 10,
})
const table = useTable(
{
data,
columns,
features,
atoms: {
pagination: paginationAtom,
},
},
(state) => state.pagination,
)
return (
<>
<div>Page {table.state.pageIndex + 1}</div>
<button onClick={() => table.nextPage()}>Next</button>
</>
)
}
No additional subscription is required:
// Not needed
useSelector(paginationAtom)
The hidden readonly atom tracks the external atom, and useTable reacts through table.store.
Why not queueMicrotask, setTimeout, or debouncing?#
A timer-based solution is not coupled to the React lifecycle.
Scheduling synchronization during render could cause a callback to run even if that render:
- Suspends.
- Is abandoned.
- Is replaced by a newer render.
- Never commits.
Timers also introduce ordering problems for rapid updates and can leave isolated subscribers stale for an arbitrary amount of time.
A passive effect would be tied to a real commit, but publication could happen after paint. A layout effect provides the required semantics:
- It runs only for a committed render.
- The committed root selection is recorded first.
- The atom graph is updated before paint.
- Root notifications can be filtered.
- Isolated subscribers can observe the committed state without relying on an arbitrary delay.
Test coverage#
The focused regression coverage includes:
| Area | Coverage |
|---|---|
| Controlled state | Live store reads, stable root subscription and no redundant render |
| Ownership transitions | Controlled/internal transitions, including isolated-subscriber invalidation |
| External atoms | Atom updates without an outer useSelector, including row-model changes |
| Precedence | External atom > controlled state > internal base atom |
| Warning regression | No render-phase warning after the first or second pagination update |
| State consistency | React state, table.state, slice atom, flat store, subscriber and row model remain aligned |
| Selector gating | Unselected internal and external changes do not rerender the root |
| Snapshot stability | Stable store.get(), fresh selector objects and recreated controlled slices |
| Rapid updates | Memoized isolated subscribers receive the final controlled value |
| Commit safety | Suspended renders do not mutate base state or notify subscribers |
| Strict Mode | Controlled updates remain stable under repeated rendering/effect execution |
| Browser integration | Controlled-state and external-atoms examples exercise pagination in Chromium |
Verified focused results:
- React adapter tests: 11/11
- Core atom tests: 11/11
- Controlled-state Chromium E2E: 3/3
- External-atoms Chromium E2E: 3/3
- Focused total: 28/28
Additional validation performed:
- Full table-core suite: 1005/1005
- Preact adapter suite: 1/1
- React/core/preact typechecks: passed
- React/core/preact builds: passed
- Controlled-state and external-atoms example builds: passed
- ESLint, Prettier and diff checks: passed
Known limitation / non-goal#
This change makes publication into the reactive atom graph commit-only, but it does not make the entire table instance render-local.
table.options is still a shared mutable object updated during render. Therefore, while a concurrent render is suspended or later abandoned, imperative reads such as:
table.store.get()
table.atoms.pagination.get()
table.getRowModel()
may observe render-in-progress options.
What is guaranteed by this PR is narrower:
- A suspended render does not mutate the committed base atoms.
- A suspended render does not notify store subscribers.
- Only a committed render publishes controlled state into the reactive graph.
Providing full concurrent isolation for imperative table reads would require a larger architectural change, such as separating render-local options from committed options or returning a render-specific table facade.
External atom identities are also expected to remain construction-stable, consistent with the current options merging behavior.
This pull request introduces significant improvements to the React adapter for TanStack Table, focusing on more robust and predictable synchronization of controlled state, better integration with React's commit phase, and enhanced test coverage. The main changes ensure that externally controlled state is only published to the table's atom graph after React commits, preventing render-phase errors and improving fine-grained reactivity. Additionally, new tests are added to verify correct behavior, and dependency updates ensure compatibility with React 19.
React Adapter and State Synchronization Enhancements:
packages/react-table/src/reactivity.ts,packages/react-table/src/useTable.ts,packages/table-core/src/core/table/coreTablesFeature.utils.ts,packages/table-core/src/core/table/constructTable.ts: Refactored the adapter to synchronize controlled state into the table's atom graph only after React commits, using a newcommitmethod and a customuseTableSelectorhook. This prevents render-phase errors and ensures that derived atoms and table APIs always read a consistent snapshot. The synchronization now supports an explicit comparator and is controlled via a newsyncExternalStateoption. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]
Test Coverage Improvements:
examples/react/basic-external-atoms/tests/e2e/smoke.spec.ts,examples/react/basic-external-state/tests/e2e/smoke.spec.ts: Added new end-to-end tests to verify that table updates correctly reflect changes from external atoms without requiring outer React subscriptions and that controlled pagination updates do not cause render-phase errors. [1] [2]packages/react-table/tests/test-setup.ts,packages/react-table/vite.config.ts: Ensured the test environment is properly set up for React 19 by enabling the act environment and including the setup file in Vite config. [1] [2]
Dependency Updates:
packages/react-table/package.json: Addedreact-domand@types/react-domas dev dependencies to support React 19 features and testing.
Example and Usage Updates:
examples/react/basic-external-atoms/src/main.tsx: Updated the example to remove unnecessaryuseSelectorcalls, relying on the improved React adapter for atom subscriptions and state access. [1] [2] [3] [4] [5]
Summary by CodeRabbit#
- New Features
- Added selector-based subscription support for React state, plus an isomorphic layout effect helper.
- Introduced render-phase reactivity to defer controlled-state publishing until commit, improving adapter consistency.
- Bug Fixes
- Improved controlled vs external state synchronization timing to reduce render/commit update warnings.
- Refined pagination and row-number rendering to stay in sync across pages and controls.
- Prevented unnecessary auto-resets when grouping inputs or column-definition references change.
- Tests
- Added Playwright smoke tests and expanded React/unit coverage for pagination, commit gating, and error-free updates.
- Documentation
- Clarified
initTableInstanceDatafeature initialization order across framework guides.
- Clarified
- 1
Note
Reviews paused#
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
reviews.auto_review.auto_pause_after_reviewed_commitssetting.Use the following commands to manage reviews:
@coderabbitai resumeto resume automatic reviews.@coderabbitai reviewto trigger a single review.
Use the checkboxes below for quick actions:
- ▶️ Resume reviews
- 🔍 Trigger review
📝 Walkthrough
Walkthrough#
Table state synchronization now uses render-phase snapshots and commit boundaries across core, React, Preact, and Lit integrations. Controlled-state publication, selector notifications, pagination examples, grouping behavior, tests, and feature lifecycle documentation were updated.
Changes#
Commit-aligned table reactivity
Layer / File(s) Summary Controlled state and render-phase contracts
packages/table-core/src/core/table/constructTable.ts,packages/table-core/src/core/table/coreTablesFeature.utils.ts,packages/table-core/src/core/reactivity/coreReactivityFeature.types.ts,packages/table-core/tests/unit/core/tableAtoms.test.tsControlled values remain visible through derived atoms while synchronization supports explicit snapshots, comparators, deferred publication, and commit callbacks. Render-phase reactivity primitives
packages/table-core/src/core/reactivity/renderPhaseReactivity.ts,packages/table-core/tests/unit/core/renderPhaseReactivity.test.tsRender-phase bindings cache snapshots, track commit versions, and filter notifications against committed snapshots. React commit synchronization
packages/react-table/src/...,packages/preact-table/src/useTable.ts,packages/react-table/package.jsonReact and Preact adapters stage options during render, select through render-phase sources, and publish controlled state after commit. Lit render-phase integration
packages/lit-table/src/...,packages/lit-table/tests/unit/selectorGate.test.tsLit adopts render-phase bindings and commits captured state during hostUpdated().React and Preact behavior validation
packages/react-table/tests/*,packages/preact-table/tests/unit/useTable.test.tsx,examples/react/basic-external-*/*,packages/react-table/vite.config.tsTests and examples cover controlled, uncontrolled, external-atom, concurrent, and post-commit pagination behavior. Mantine and Material table updates
examples/react/mantine-react-table/...,examples/react/material-react-table/...Examples use live pagination state, state-aware column ordering, dependency-aware column preparation, and new pagination and grouping smoke tests. Grouping auto-reset conditions
packages/table-core/src/features/column-grouping/createGroupedRowModel.ts,packages/table-core/tests/implementation/core/autoReset.test.tsGrouping auto-resets now occur only when relevant row inputs change, including coverage for equivalent column reference updates. Feature initialization ordering documentation
docs/framework/*/guide/custom-features.mdFramework guides describe initialization and API construction as a single registration-order pass. Estimated code review effort: 4 (Complex) | ~60 minutes
Sequence Diagram(s)#
sequenceDiagram participant Framework participant useTable participant RenderPhaseSource participant table_setOptions participant table_publishExternalState participant Subscribers Framework->>useTable: render controlled options useTable->>table_setOptions: stage options without synchronization useTable->>RenderPhaseSource: read render snapshot Framework->>useTable: run commit lifecycle useTable->>RenderPhaseSource: markCommitted(snapshot) useTable->>table_publishExternalState: publish controlled state table_publishExternalState->>Subscribers: notify committed selected state🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)#
Check name Status Explanation Resolution Docstring Coverage ⚠️ Warning Docstring coverage is 29.03% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold. ✅ Passed checks (4 passed)
Check name Status Explanation Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled. Title check ✅ Passed The title accurately captures the main change: fixing React adapter state synchronization behavior. 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 💡 1
📝 Generate docstrings 💡
- Create stacked PR
- Commit on current branch
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Commit unit tests in branch `fix/react-sync-state-adapter`
Warning
Review ran into problems#
🔥 Problems
Git: Failed to clone repository. Please run the
@coderabbitai full reviewcommand to re-trigger a full review. If the issue persists, setpath_filtersto include or exclude specific files.
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.
Comment `@coderabbitai help` to get the list of available commands.More templates
- tanstack-alpine-table-example-aggregation
- tanstack-alpine-table-example-basic-app-table
- tanstack-alpine-table-example-basic-create-table
- tanstack-alpine-table-example-basic-dynamic-columns
- tanstack-alpine-table-example-basic-external-atoms
- tanstack-alpine-table-example-basic-external-state
- tanstack-alpine-table-example-cell-selection
- tanstack-alpine-table-example-column-ordering
- tanstack-alpine-table-example-column-pinning
- tanstack-alpine-table-example-column-pinning-split
- tanstack-alpine-table-example-column-pinning-sticky
- tanstack-alpine-table-example-column-resizing
- tanstack-alpine-table-example-column-resizing-performant
- tanstack-alpine-table-example-column-sizing
- tanstack-alpine-table-example-column-visibility
- tanstack-alpine-table-example-custom-plugin
- tanstack-alpine-table-example-expanding
- tanstack-alpine-table-example-filters
- tanstack-alpine-table-example-filters-faceted
- tanstack-alpine-table-example-filters-faceted-bucketed
- tanstack-alpine-table-example-grouped-aggregation
- tanstack-alpine-table-example-grouping
- tanstack-alpine-table-example-header-groups
- tanstack-alpine-table-example-pagination
- tanstack-alpine-table-example-row-pinning
- tanstack-alpine-table-example-row-selection
- tanstack-alpine-table-example-sorting
- tanstack-alpine-table-example-sorting-dynamic-data
- tanstack-alpine-table-example-sub-components
- tanstack-angular-table-example-aggregation
- tanstack-angular-table-example-basic-app-table
- tanstack-angular-table-example-basic-dynamic-columns
- tanstack-angular-table-example-basic-external-atoms
- tanstack-angular-table-example-basic-external-state
- tanstack-angular-table-example-basic-inject-table
- tanstack-angular-table-example-cell-selection
- tanstack-angular-table-example-column-ordering
- tanstack-angular-table-example-column-pinning
- tanstack-angular-table-example-column-pinning-split
- tanstack-angular-table-example-column-pinning-sticky
- tanstack-angular-table-example-column-resizing
- tanstack-angular-table-example-column-resizing-performant
- tanstack-angular-table-example-column-sizing
- tanstack-angular-table-example-column-visibility
- tanstack-angular-table-example-composable-tables
- tanstack-angular-table-example-custom-plugin
- tanstack-angular-table-example-editable
- tanstack-angular-table-example-expanding
- tanstack-angular-table-example-filters
- tanstack-angular-table-example-filters-faceted
- tanstack-angular-table-example-filters-faceted-bucketed
- tanstack-angular-table-example-filters-fuzzy
- tanstack-angular-table-example-grouped-aggregation
- tanstack-angular-table-example-grouping
- tanstack-angular-table-example-header-groups
- tanstack-angular-table-example-kitchen-sink
- tanstack-angular-table-example-pagination
- tanstack-angular-table-example-remote-data
- tanstack-angular-table-example-row-dnd
- tanstack-angular-table-example-row-pinning
- tanstack-angular-table-example-row-selection
- tanstack-angular-table-example-row-selection-signal
- tanstack-angular-table-example-signal-input
- tanstack-angular-table-example-sorting
- tanstack-angular-table-example-sub-components
- tanstack-angular-table-example-virtualized-columns
- tanstack-angular-table-example-virtualized-infinite-scrolling
- tanstack-angular-table-example-virtualized-rows
- tanstack-angular-table-example-with-tanstack-form
- tanstack-angular-table-example-with-tanstack-query
- tanstack-ember-table-example-aggregation
- tanstack-ember-table-example-basic-app-table
- tanstack-ember-table-example-basic-external-atoms
- tanstack-ember-table-example-basic-external-state
- tanstack-ember-table-example-basic-table
- tanstack-ember-table-example-cell-selection
- tanstack-ember-table-example-column-ordering
- tanstack-ember-table-example-column-pinning
- tanstack-ember-table-example-column-pinning-split
- tanstack-ember-table-example-column-pinning-sticky
- tanstack-ember-table-example-column-resizing
- tanstack-ember-table-example-column-resizing-performant
- tanstack-ember-table-example-column-sizing
- tanstack-ember-table-example-column-visibility
- tanstack-ember-table-example-custom-plugin
- tanstack-ember-table-example-editable
- tanstack-ember-table-example-expanding
- tanstack-ember-table-example-filters
- tanstack-ember-table-example-filters-faceted
- tanstack-ember-table-example-filters-faceted-bucketed
- tanstack-ember-table-example-filters-fuzzy
- tanstack-ember-table-example-grouped-aggregation
- tanstack-ember-table-example-grouping
- tanstack-ember-table-example-header-groups
- tanstack-ember-table-example-kitchen-sink
- tanstack-ember-table-example-pagination
- tanstack-ember-table-example-remote-data
- tanstack-ember-table-example-row-dnd
- tanstack-ember-table-example-row-pinning
- tanstack-ember-table-example-row-selection
- tanstack-ember-table-example-sorting
- tanstack-ember-table-example-sub-components
- tanstack-lit-table-example-aggregation
- tanstack-lit-table-example-basic-app-table
- tanstack-lit-table-example-basic-dynamic-columns
- tanstack-lit-table-example-basic-external-atoms
- tanstack-lit-table-example-basic-external-state
- tanstack-lit-table-example-basic-subscribe
- tanstack-lit-table-example-basic-table-controller
- tanstack-lit-table-example-cell-selection
- tanstack-lit-table-example-column-ordering
- tanstack-lit-table-example-column-pinning
- tanstack-lit-table-example-column-pinning-split
- tanstack-lit-table-example-column-pinning-sticky
- tanstack-lit-table-example-column-resizing
- tanstack-lit-table-example-column-resizing-performant
- tanstack-lit-table-example-column-sizing
- tanstack-lit-table-example-column-visibility
- tanstack-lit-table-example-composable-tables
- tanstack-lit-table-example-expanding
- tanstack-lit-table-example-filters
- tanstack-lit-table-example-filters-faceted
- tanstack-lit-table-example-filters-faceted-bucketed
- tanstack-lit-table-example-filters-fuzzy
- tanstack-lit-table-example-grouped-aggregation
- tanstack-lit-table-example-grouping
- tanstack-lit-table-example-header-groups
- tanstack-lit-table-example-kitchen-sink
- tanstack-lit-table-example-pagination
- tanstack-lit-table-example-row-pinning
- tanstack-lit-table-example-row-selection
- tanstack-lit-table-example-sorting
- tanstack-lit-table-example-sorting-dynamic-data
- tanstack-lit-table-example-sub-components
- tanstack-lit-table-example-virtualized-columns
- tanstack-lit-table-example-virtualized-infinite-scrolling
- tanstack-lit-table-example-virtualized-rows
- tanstack-preact-table-example-aggregation
- tanstack-preact-table-example-basic-dynamic-columns
- tanstack-preact-table-example-basic-external-atoms
- tanstack-preact-table-example-basic-external-state
- tanstack-preact-table-example-basic-subscribe
- tanstack-preact-table-example-basic-use-app-table
- tanstack-preact-table-example-basic-use-table
- tanstack-preact-table-example-cell-selection
- tanstack-preact-table-example-column-ordering
- tanstack-preact-table-example-column-pinning
- tanstack-preact-table-example-column-pinning-split
- tanstack-preact-table-example-column-pinning-sticky
- tanstack-preact-table-example-column-resizing
- tanstack-preact-table-example-column-resizing-performant
- tanstack-preact-table-example-column-sizing
- tanstack-preact-table-example-column-visibility
- tanstack-preact-table-example-composable-tables
- tanstack-preact-table-example-custom-plugin
- tanstack-preact-table-example-expanding
- tanstack-preact-table-example-filters
- tanstack-preact-table-example-filters-faceted
- tanstack-preact-table-example-filters-faceted-bucketed
- tanstack-preact-table-example-filters-fuzzy
- tanstack-preact-table-example-grouped-aggregation
- tanstack-preact-table-example-grouping
- tanstack-preact-table-example-header-groups
- tanstack-preact-table-example-kitchen-sink
- tanstack-preact-table-example-pagination
- tanstack-preact-table-example-row-pinning
- tanstack-preact-table-example-row-selection
- tanstack-preact-table-example-sorting
- tanstack-preact-table-example-sub-components
- tanstack-preact-table-example-with-tanstack-form
- tanstack-preact-table-example-with-tanstack-query
- tanstack-solid-table-example-aggregation
- tanstack-solid-table-example-basic-app-table
- tanstack-solid-table-example-basic-dynamic-columns
- tanstack-solid-table-example-basic-external-atoms
- tanstack-solid-table-example-basic-external-state
- tanstack-solid-table-example-basic-use-table
- tanstack-solid-table-example-cell-selection
- tanstack-solid-table-example-column-ordering
- tanstack-solid-table-example-column-pinning
- tanstack-solid-table-example-column-pinning-split
- tanstack-solid-table-example-column-pinning-sticky
- tanstack-solid-table-example-column-resizing
- tanstack-solid-table-example-column-resizing-performant
- tanstack-solid-table-example-column-sizing
- tanstack-solid-table-example-column-visibility
- tanstack-solid-table-example-composable-tables
- tanstack-solid-table-example-expanding
- tanstack-solid-table-example-filters
- tanstack-solid-table-example-filters-faceted
- tanstack-solid-table-example-filters-faceted-bucketed
- tanstack-solid-table-example-filters-fuzzy
- tanstack-solid-table-example-grouped-aggregation
- tanstack-solid-table-example-grouping
- tanstack-solid-table-example-header-groups
- tanstack-solid-table-example-kitchen-sink
- tanstack-solid-table-example-pagination
- tanstack-solid-table-example-row-pinning
- tanstack-solid-table-example-row-selection
- tanstack-solid-table-example-sorting
- tanstack-solid-table-example-sub-components
- tanstack-solid-table-example-virtualized-columns
- tanstack-solid-table-example-virtualized-infinite-scrolling
- tanstack-solid-table-example-virtualized-rows
- tanstack-solid-table-example-with-tanstack-form
- tanstack-solid-table-example-with-tanstack-query
- tanstack-solid-table-example-with-tanstack-router
- tanstack-vanilla-table-example-aggregation
- tanstack-vanilla-table-example-basic
- tanstack-vanilla-table-example-pagination
- tanstack-vanilla-table-example-sorting
- tanstack-svelte-table-example-aggregation
- tanstack-svelte-table-example-basic-app-table
- tanstack-svelte-table-example-basic-create-table
- tanstack-svelte-table-example-basic-dynamic-columns
- tanstack-svelte-table-example-basic-external-atoms
- tanstack-svelte-table-example-basic-external-state
- tanstack-svelte-table-example-basic-snippets
- tanstack-svelte-table-example-cell-selection
- tanstack-svelte-table-example-column-ordering
- tanstack-svelte-table-example-column-pinning
- tanstack-svelte-table-example-column-pinning-split
- tanstack-svelte-table-example-column-pinning-sticky
- tanstack-svelte-table-example-column-resizing
- tanstack-svelte-table-example-column-resizing-performant
- tanstack-svelte-table-example-column-sizing
- tanstack-svelte-table-example-column-visibility
- tanstack-svelte-table-example-composable-tables
- tanstack-svelte-table-example-expanding
- tanstack-svelte-table-example-filtering
- tanstack-svelte-table-example-filters-faceted
- tanstack-svelte-table-example-filters-faceted-bucketed
- tanstack-svelte-table-example-filters-fuzzy
- tanstack-svelte-table-example-grouped-aggregation
- tanstack-svelte-table-example-grouping
- tanstack-svelte-table-example-header-groups
- tanstack-svelte-table-example-kitchen-sink
- tanstack-svelte-table-example-pagination
- tanstack-svelte-table-example-row-pinning
- tanstack-svelte-table-example-row-selection
- tanstack-svelte-table-example-sorting
- tanstack-svelte-table-example-sub-components
- tanstack-svelte-table-example-virtualized-columns
- tanstack-svelte-table-example-virtualized-infinite-scrolling
- tanstack-svelte-table-example-virtualized-rows
- tanstack-svelte-table-example-with-tanstack-form
- tanstack-svelte-table-example-with-tanstack-query
- tanstack-react-table-example-aggregation
- tanstack-react-table-example-basic-dynamic-columns
- tanstack-react-table-example-basic-external-atoms
- tanstack-react-table-example-basic-external-state
- tanstack-react-table-example-basic-subscribe
- tanstack-react-table-example-basic-use-app-table
- tanstack-react-table-example-basic-use-legacy-table
- tanstack-react-table-example-basic-use-table
- tanstack-react-table-example-cell-selection
- tanstack-react-table-example-column-dnd
- tanstack-react-table-example-column-ordering
- tanstack-react-table-example-column-pinning
- tanstack-react-table-example-column-pinning-split
- tanstack-react-table-example-column-pinning-sticky
- tanstack-react-table-example-column-resizing
- tanstack-react-table-example-column-resizing-performant
- tanstack-react-table-example-column-sizing
- tanstack-react-table-example-column-visibility
- tanstack-react-table-example-composable-tables
- tanstack-react-table-example-custom-plugin
- tanstack-react-table-example-expanding
- tanstack-react-table-example-filters
- tanstack-react-table-example-filters-faceted
- tanstack-react-table-example-filters-faceted-bucketed
- tanstack-react-table-example-filters-fuzzy
- tanstack-react-table-example-grouped-aggregation
- tanstack-react-table-example-grouping
- tanstack-react-table-example-header-groups
- tanstack-react-table-example-kitchen-sink
- tanstack-react-table-example-kitchen-sink-chakra-ui
- tanstack-react-table-example-kitchen-sink-hero-ui
- tanstack-react-table-example-kitchen-sink-mantine
- tanstack-react-table-example-kitchen-sink-material-ui
- tanstack-react-table-example-kitchen-sink-react-aria
- tanstack-react-table-example-kitchen-sink-shadcn-base
- tanstack-react-table-example-kitchen-sink-shadcn-radix
- tanstack-react-table-example-lib-chakra-ui
- tanstack-react-table-example-lib-hero-ui
- tanstack-react-table-example-lib-mantine
- tanstack-react-table-example-lib-material-ui
- tanstack-react-table-example-lib-react-aria
- tanstack-react-table-example-lib-shadcn-base
- tanstack-react-table-example-lib-shadcn-radix
- tanstack-react-table-example-mantine-react-table
- tanstack-react-table-example-material-react-table
- tanstack-react-table-example-pagination
- tanstack-react-table-example-row-dnd
- tanstack-react-table-example-row-pinning
- tanstack-react-table-example-row-selection
- tanstack-react-table-example-sorting
- tanstack-react-table-example-spreadsheet
- tanstack-react-table-example-sub-components
- tanstack-react-table-example-virtualized-columns
- tanstack-react-table-example-virtualized-columns-experimental
- tanstack-react-table-example-virtualized-infinite-scrolling
- tanstack-react-table-example-virtualized-rows
- tanstack-react-table-example-virtualized-rows-experimental
- tanstack-react-table-example-web-worker-row-models
- tanstack-react-table-example-with-tanstack-form
- tanstack-react-table-example-with-tanstack-query
- tanstack-react-table-example-with-tanstack-router
- tanstack-vue-table-example-aggregation
- tanstack-vue-table-example-basic-dynamic-columns
- tanstack-vue-table-example-basic-external-atoms
- tanstack-vue-table-example-basic-external-state
- tanstack-vue-table-example-basic-use-app-table
- tanstack-vue-table-example-basic-use-table
- tanstack-vue-table-example-cell-selection
- tanstack-vue-table-example-column-ordering
- tanstack-vue-table-example-column-pinning
- tanstack-vue-table-example-column-pinning-split
- tanstack-vue-table-example-column-pinning-sticky
- tanstack-vue-table-example-column-resizing
- tanstack-vue-table-example-column-resizing-performant
- tanstack-vue-table-example-column-sizing
- tanstack-vue-table-example-column-visibility
- tanstack-vue-table-example-composable-tables
- tanstack-vue-table-example-expanding
- tanstack-vue-table-example-filters
- tanstack-vue-table-example-filters-faceted
- tanstack-vue-table-example-filters-faceted-bucketed
- tanstack-vue-table-example-filters-fuzzy
- tanstack-vue-table-example-grouped-aggregation
- tanstack-vue-table-example-grouping
- tanstack-vue-table-example-header-groups
- tanstack-vue-table-example-kitchen-sink
- tanstack-vue-table-example-pagination
- tanstack-vue-table-example-row-pinning
- tanstack-vue-table-example-row-selection
- tanstack-vue-table-example-sorting
- tanstack-vue-table-example-sub-components
- tanstack-vue-table-example-virtualized-columns
- tanstack-vue-table-example-virtualized-infinite-scrolling
- tanstack-vue-table-example-virtualized-rows
- tanstack-vue-table-example-with-tanstack-form
- tanstack-vue-table-example-with-tanstack-query
@tanstack/alpine-table
npm i https://pkg.pr.new/TanStack/table/@tanstack/alpine-table@6458@tanstack/angular-table
npm i https://pkg.pr.new/TanStack/table/@tanstack/angular-table@6458@tanstack/angular-table-devtools
npm i https://pkg.pr.new/TanStack/table/@tanstack/angular-table-devtools@6458@tanstack/ember-table
npm i https://pkg.pr.new/TanStack/table/@tanstack/ember-table@6458@tanstack/lit-table
npm i https://pkg.pr.new/TanStack/table/@tanstack/lit-table@6458@tanstack/match-sorter-utils
npm i https://pkg.pr.new/TanStack/table/@tanstack/match-sorter-utils@6458@tanstack/preact-table
npm i https://pkg.pr.new/TanStack/table/@tanstack/preact-table@6458@tanstack/preact-table-devtools
npm i https://pkg.pr.new/TanStack/table/@tanstack/preact-table-devtools@6458@tanstack/react-table
npm i https://pkg.pr.new/TanStack/table/@tanstack/react-table@6458@tanstack/react-table-devtools
npm i https://pkg.pr.new/TanStack/table/@tanstack/react-table-devtools@6458@tanstack/solid-table
npm i https://pkg.pr.new/TanStack/table/@tanstack/solid-table@6458@tanstack/solid-table-devtools
npm i https://pkg.pr.new/TanStack/table/@tanstack/solid-table-devtools@6458@tanstack/svelte-table
npm i https://pkg.pr.new/TanStack/table/@tanstack/svelte-table@6458@tanstack/table-core
npm i https://pkg.pr.new/TanStack/table/@tanstack/table-core@6458@tanstack/table-devtools
npm i https://pkg.pr.new/TanStack/table/@tanstack/table-devtools@6458@tanstack/vue-table
npm i https://pkg.pr.new/TanStack/table/@tanstack/vue-table@6458@tanstack/vue-table-devtools
npm i https://pkg.pr.new/TanStack/table/@tanstack/vue-table-devtools@6458commit:
6e781d1riccardoperra reviewed
@@ -34,8 +80,21 @@80+ }3481 },3582 createWritableAtom: <T>(value: T, options?: TableAtomOptions<T>) => {3683 return createAtom(value, {3784 compare: options?.compare,3885 })3986 },87+ commit: () => {88+ commitAtom.set((version) => version + 1)89+ },4090 }4191 }92+93+/**94+ * Selects the root table state while filtering notifications that merely95+ * publish a snapshot already read during the current React render.96+ *97+ * Isolated `table.Subscribe` consumers still receive the underlying store98+ * notification; only this hook's root subscription is filtered.99+ */100+export function useTableSelector<TState, TSelected>(fyi this is just a useSyncWithExternalStoreWithSelector revisited implementation
🧹 Nitpick comments (3)
packages/react-table/tests/useTable.test.tsx (1)
1-930: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winConsider extracting a shared DOM-query helper.
The
container?.querySelector('[data-testid="..."]')?.textContentpattern is repeated across nearly every test. A small helper (e.g.queryText(testId: string)) would reduce boilerplate and keep future tests consistent.♻️ Example helper
function queryText(testId: string) { return container?.querySelector(`[data-testid="${testId}"]`)?.textContent }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/react-table/tests/useTable.test.tsx` around lines 1 - 930, Extract a shared queryText(testId) helper near render and reuse it throughout the tests in place of repeated container?.querySelector('[data-testid="..."]')?.textContent expressions. Update all data-testid lookups to call the helper while preserving their existing assertions and behavior.packages/react-table/src/reactivity.ts (1)
100-149: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick wincompareis frozen at first render whileselectoris kept live via ref.selectorRefis updated every render so the latestselectoris always used, butcompareis captured directly by theuseStateinitializer closure and never refreshed — if a caller ever passes a non-stablecomparefunction, this hook would silently keep using the very first one forever. Today this is harmless because both call sites (useTable.ts) pass the same stableshallowreference, but this is an exported hook, so the inconsistency is a latent footgun for other/future callers.♻️ Proposed fix: mirror the selector-ref pattern for compare
const selectorRef = useRef(selector) selectorRef.current = selector + const compareRef = useRef(compare) + compareRef.current = compare const [selectedSource] = useState(() => { let hasSnapshot = false let snapshot: TSelected const getSnapshot = () => { const select = selectorRef.current ?? ((state: TState) => state as unknown as TSelected) const nextSnapshot = select(source.get()) - if (!hasSnapshot || !compare(snapshot, nextSnapshot)) { + if (!hasSnapshot || !compareRef.current(snapshot, nextSnapshot)) { snapshot = nextSnapshot hasSnapshot = true } return snapshot }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/react-table/src/reactivity.ts` around lines 100 - 149, Keep the comparison function current in useTableSelector by mirroring the existing selectorRef pattern: store compare in a ref and update it on every render, then have getSnapshot use the ref’s current comparator instead of the initializer-captured compare parameter. Preserve the existing snapshot caching and subscription behavior.packages/table-core/src/core/table/coreTablesFeature.utils.ts (1)
53-66: 🗄️ Data Integrity & Integration | 🔵 Trivial | 💤 Low valueSkip
options.statesync for keys owned by external atoms.When a slice has both
options.atoms[key]andoptions.state[key],table.atoms[key]reads the external atom only, sotable_syncExternalStateToBaseAtoms()leavingbaseAtoms[key]stale is safe unless a setter readstable.baseAtoms[key]as the current value. Current feature code reads throughtable.atoms, so this is only a minor correctness cleanup.🛡️ Proposed fix
+import { hasOwn } from '../../utils' + table._reactivity.batch(() => { for (const key in state) { const baseAtom = (table.baseAtoms as Record<string, any>)[key] if (!baseAtom) { continue } + const externalAtoms = table.options.atoms as + | Record<string, unknown> + | undefined + if (externalAtoms && hasOwn(externalAtoms, key)) { + // An external atom owns this slice; `table.atoms[key]` never reads + // the base atom for it, so writing here would only leave stale data behind. + continue + } const externalState = state[key as keyof typeof state] const currentState = table._reactivity.untrack(() => baseAtom.get()) if (!compare(currentState, externalState)) { baseAtom.set(() => externalState) } } })🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/table-core/src/core/table/coreTablesFeature.utils.ts` around lines 53 - 66, Update table_syncExternalStateToBaseAtoms so it skips state synchronization for keys present in options.atoms, leaving those externally owned atoms untouched. Keep the existing baseAtoms lookup, comparison, and update behavior for keys without an external atom.🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. Nitpick comments: In `@packages/react-table/src/reactivity.ts`: - Around line 100-149: Keep the comparison function current in useTableSelector by mirroring the existing selectorRef pattern: store compare in a ref and update it on every render, then have getSnapshot use the ref’s current comparator instead of the initializer-captured compare parameter. Preserve the existing snapshot caching and subscription behavior. In `@packages/react-table/tests/useTable.test.tsx`: - Around line 1-930: Extract a shared queryText(testId) helper near render and reuse it throughout the tests in place of repeated container?.querySelector('[data-testid="..."]')?.textContent expressions. Update all data-testid lookups to call the helper while preserving their existing assertions and behavior. In `@packages/table-core/src/core/table/coreTablesFeature.utils.ts`: - Around line 53-66: Update table_syncExternalStateToBaseAtoms so it skips state synchronization for keys present in options.atoms, leaving those externally owned atoms untouched. Keep the existing baseAtoms lookup, comparison, and update behavior for keys without an external atom.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID:
58ab51b0-2435-4a26-bf73-f174554d6cb5📥 Commits
Reviewing files that changed from the base of the PR and between 0df4675f46ae34b92f7bef5061f3a346948522e3 and 46921d567ef40fb4271621c817ddce11163c8581.
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (12)
examples/react/basic-external-atoms/src/main.tsxexamples/react/basic-external-atoms/tests/e2e/smoke.spec.tsexamples/react/basic-external-state/tests/e2e/smoke.spec.tspackages/react-table/package.jsonpackages/react-table/src/reactivity.tspackages/react-table/src/useTable.tspackages/react-table/tests/test-setup.tspackages/react-table/tests/useTable.test.tsxpackages/react-table/vite.config.tspackages/table-core/src/core/table/constructTable.tspackages/table-core/src/core/table/coreTablesFeature.utils.tspackages/table-core/tests/unit/core/tableAtoms.test.ts
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. Inline comments: In `@docs/framework/alpine/guide/custom-features.md`: - Line 143: Correct the constructTableAPIs lifecycle wording so it guarantees access only to data initialized by the current and previously registered features, not all features. Apply this clarification in docs/framework/alpine/guide/custom-features.md:143-143, docs/framework/angular/guide/custom-features.md:149-149, docs/framework/ember/guide/custom-features.md:149-149, docs/framework/lit/guide/custom-features.md:141-141, docs/framework/preact/guide/custom-features.md:149-149, docs/framework/react/guide/custom-features.md:149-149, docs/framework/solid/guide/custom-features.md:143-143, docs/framework/svelte/guide/custom-features.md:143-143, and docs/framework/vue/guide/custom-features.md:143-143; explicitly state that later feature initialization has not occurred and preserve the single-pass registration-order execution model.🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID:
ee925b54-1b40-4ab3-a19c-492e46ec1cf7📥 Commits
Reviewing files that changed from the base of the PR and between d0f7a3e1c5b44f620ab901e1ff16bd27ca472137 and 4a5fcbe3088921e604c307459d5c8d8e94f6a679.
📒 Files selected for processing (9)
docs/framework/alpine/guide/custom-features.mddocs/framework/angular/guide/custom-features.mddocs/framework/ember/guide/custom-features.mddocs/framework/lit/guide/custom-features.mddocs/framework/preact/guide/custom-features.mddocs/framework/react/guide/custom-features.mddocs/framework/solid/guide/custom-features.mddocs/framework/svelte/guide/custom-features.mddocs/framework/vue/guide/custom-features.md
@@ -140,4 +140,4 @@140140141141 #### initTableInstanceData and resetTableInstanceData142142143-Use `initTableInstanceData` for mutable, non-reactive data that belongs to one table instance, such as an interaction anchor or an imperative cache. It runs once after table options, state atoms, and the store have been created. Every feature's initialization hook runs before any feature's `constructTableAPIs` hook.143+Use `initTableInstanceData` for mutable, non-reactive data that belongs to one table instance, such as an interaction anchor or an imperative cache. It runs once after table options, state atoms, and the store have been created. Features are processed in a single pass in registration order; each feature's initialization hook runs just before that feature's `constructTableAPIs` hook, so hooks may rely on data and APIs from features registered earlier.🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Correct the conflicting lifecycle guarantee across all framework guides.
The new text says initialization and construction are interleaved per feature, but the following
constructTableAPIsdescription still says all feature-owned data has already been initialized. That can mislead feature authors into depending on later registrations.docs/framework/alpine/guide/custom-features.md#L143-L143: Clarify the following paragraph to guarantee only the current and earlier features’ data.docs/framework/angular/guide/custom-features.md#L149-L149: Replace the global initialization implication with the current-feature guarantee.docs/framework/ember/guide/custom-features.md#L149-L149: State that later feature initialization has not occurred yet.docs/framework/lit/guide/custom-features.md#L141-L141: Align the construct-hook paragraph with single-pass execution.docs/framework/preact/guide/custom-features.md#L149-L149: Remove the obsolete all-features guarantee.docs/framework/react/guide/custom-features.md#L149-L149: Document that only the current feature’s initialization is complete.docs/framework/solid/guide/custom-features.md#L143-L143: Preserve the dependency boundary for later features.docs/framework/svelte/guide/custom-features.md#L143-L143: Update the construct-hook wording to match interleaving.docs/framework/vue/guide/custom-features.md#L143-L143: Replace “all feature-owned” with the precise current-feature guarantee.
📍 Affects 9 files
docs/framework/alpine/guide/custom-features.md#L143-L143(this comment)docs/framework/angular/guide/custom-features.md#L149-L149docs/framework/ember/guide/custom-features.md#L149-L149docs/framework/lit/guide/custom-features.md#L141-L141docs/framework/preact/guide/custom-features.md#L149-L149docs/framework/react/guide/custom-features.md#L149-L149docs/framework/solid/guide/custom-features.md#L143-L143docs/framework/svelte/guide/custom-features.md#L143-L143docs/framework/vue/guide/custom-features.md#L143-L143
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/framework/alpine/guide/custom-features.md` at line 143, Correct the constructTableAPIs lifecycle wording so it guarantees access only to data initialized by the current and previously registered features, not all features. Apply this clarification in docs/framework/alpine/guide/custom-features.md:143-143, docs/framework/angular/guide/custom-features.md:149-149, docs/framework/ember/guide/custom-features.md:149-149, docs/framework/lit/guide/custom-features.md:141-141, docs/framework/preact/guide/custom-features.md:149-149, docs/framework/react/guide/custom-features.md:149-149, docs/framework/solid/guide/custom-features.md:143-143, docs/framework/svelte/guide/custom-features.md:143-143, and docs/framework/vue/guide/custom-features.md:143-143; explicitly state that later feature initialization has not occurred and preserve the single-pass registration-order execution model.🧹 Nitpick comments (1)
packages/table-core/tests/implementation/core/autoReset.test.ts (1)
199-212: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAdd coverage for both reset paths.
This test covers only
pageIndexand a reference-only columns update. Add cases verifying that expanded state is also preserved for equivalent columns, while real grouping or pre-grouped-row-model changes still reset both pagination and expansion.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/table-core/tests/implementation/core/autoReset.test.ts` around lines 199 - 212, Extend the auto-reset coverage around the existing column-reference test to assert expanded state remains unchanged for equivalent columns, and add cases for real grouping changes and pre-grouped-row-model changes that verify both pagination.pageIndex and expanded state reset. Reuse the existing table setup and reset-path helpers, keeping the reference-only columns behavior unchanged.🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. Nitpick comments: In `@packages/table-core/tests/implementation/core/autoReset.test.ts`: - Around line 199-212: Extend the auto-reset coverage around the existing column-reference test to assert expanded state remains unchanged for equivalent columns, and add cases for real grouping changes and pre-grouped-row-model changes that verify both pagination.pageIndex and expanded state reset. Reuse the existing table setup and reset-path helpers, keeping the reference-only columns behavior unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID:
534382ca-36d7-46f7-bedf-6ed3834cf4fe📥 Commits
Reviewing files that changed from the base of the PR and between 99922ac2def32d18c1c29b03dc44aa4fb16f0a97 and c0ff6992a47bc3f40c7c7b8bce5f47c205b24992.
📒 Files selected for processing (12)
examples/react/mantine-react-table/src/mantine-react-table/components/menus/MRT_ShowHideColumnsMenu.tsxexamples/react/mantine-react-table/src/mantine-react-table/hooks/display-columns/getMRT_RowNumbersColumnDef.tsxexamples/react/mantine-react-table/src/mantine-react-table/hooks/useMRT_Effects.tsexamples/react/mantine-react-table/src/mantine-react-table/hooks/useMRT_TableInstance.tsexamples/react/mantine-react-table/tests/e2e/smoke.spec.tsexamples/react/material-react-table/src/material-react-table/components/menus/MRT_ShowHideColumnsMenu.tsxexamples/react/material-react-table/src/material-react-table/hooks/display-columns/getMRT_RowNumbersColumnDef.tsxexamples/react/material-react-table/src/material-react-table/hooks/useMRT_Effects.tsexamples/react/material-react-table/src/material-react-table/hooks/useMRT_TableInstance.tsexamples/react/material-react-table/tests/e2e/smoke.spec.tspackages/table-core/src/features/column-grouping/createGroupedRowModel.tspackages/table-core/tests/implementation/core/autoReset.test.ts
KevinVandy merged this4be42f9
KevinVandy closed this
Sign in to join this conversation.
View your CI Pipeline Execution ↗ for commit 6e781d1566e3278bad368251a5cfd50c94713c5b
nx affected --targets=test:eslint,test:sherif,t...nx run-many --targets=build --exclude=examples/**☁️ Nx Cloud last updated this comment at
2026-07-29 19:03:44UTC