0
Fork 0
mirror of https://github.com/TanStack/table.git synced 2026-11-18 18:55:54 +00:00
Commit graph

7 commits

Author SHA1 Message Date
Kevin Van Cott
09598d2e41
feat: support infinite pagination page sizes (#6526)
* feat: support infinite pagination page sizes

* add devtools to all with-tanstack examples

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-07 13:11:04 -05:00
Kevin Van Cott
8c9df9c25b
fix(table-core): wire expansion auto-reset into the core row model and guard first runs (#6499)
Auto-resets are `onAfterUpdate` hooks on the row model stage memos. Two
related defects made them fire in the wrong places.

Expansion auto-reset was only wired from the grouped row model, so
`autoResetExpanded` silently did nothing for tables that use expansion
without grouping (#5801). It is now wired from `createCoreRowModel`
alongside the existing pageIndex, sorting, and cell-selection resets, so
a data reference change resets expansion regardless of which features are
installed. `table_autoResetExpanded` gained the same feature guard the
sorting and cell-selection resets already use, since the core row model
runs on tables without the expanding feature.

Auto-resets also fired on the very first computation of every stage
(#5968). `memo` seeds its dependency list to `[]`, so the initial run
always compares as changed, and merely reading a row model on mount
scheduled resets. For uncontrolled tables this was self-cancelling (the
reset targets `initialState`), which is why it went unnoticed, but it
wiped a seeded `initialState.pagination.pageIndex` and pushed unsolicited
`onExpandedChange` / `onPaginationChange` calls at controlled consumers on
mount. v7 and v8 suppressed the first run with a `registered` flag; the
v9 rewrite dropped it.

A new `skipFirstRun` util restores that suppression. It is applied in the
row model factories, which already run once per table, so each table gets
its own flag. The grouped row model tracked previous inputs already and
only needed its first-run condition inverted. The worker bridge reports
every stage as changed in its first response, so it carries an equivalent
`hasAppliedResults` flag.

Landing order matters: wiring expansion into the core row model without
the first-run guard would have extended the mount-time wipe from grouped
tables to every table using expansion, so both halves ship together.

- fix: wire `table_autoResetExpanded` into `createCoreRowModel` (#5801)
- fix: skip auto-resets on the first computation of each stage (#5968)
- add `skipFirstRun` util; apply to core, filtered, and sorted row models
- invert the grouped row model's first-run condition
- guard `table_autoResetExpanded` when the expanding feature is absent
- skip auto-resets on the worker bridge's first applied result
- tests: expansion reset without the grouping feature; first-run guard
  suite covering seeded initial state and controlled-state consumers

Examples: migrate the basic examples to `createColumnHelper` across all
frameworks, document more table options inline as commented-out defaults,
and replace the `filterFns.between` workaround in the React expanding
example with the `filterFn_between` individual export that already
existed.

Closes #5801
Closes #5968
Supersedes #6443

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-02 17:31:25 -05:00
Kevin Van Cott
3b2eb64256
test: add more e2e tests 2026-07-29 19:29:33 -05:00
Kevin Van Cott
209699ff77
docs: rewrite faceting guides and bucketd faced example 2026-07-17 18:26:00 -05:00
Kevin Van Cott
6acc1e9215
fix: rename to rowAggregationFeature and rewrite migration guides (#6423)
* fix: rename to rowAggregationFeature and rewrite migration guides

* ci: apply automated fixes

* update feature name in migration guide

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-15 21:45:07 -05:00
Kevin Van Cott
66f7508801
fix: add back sub-rows onto aggregate context (#6421)
* fix: add back sub-rows onto aggregate context

* aggregate from sub-rows by default first like v8 behavior

* new APIs for custom aggregation depths

* fix example signatures

* update docs
2026-07-15 18:46:56 -05:00
Kevin Van Cott
f265513e01
feat: aggregation overhaul as a standalone feature (#6418)
* feat: aggregation overhaul as a standalone feature

* finish updating rest of examples and guides
2026-07-14 12:48:08 -05:00