mirror of
https://github.com/TanStack/table.git
synced 2026-11-18 18:55:54 +00:00
* refactor(table-core): centralize no-op state update guarding in setStateSlice Route every table.setX state router through a single setStateSlice util that resolves the updater once against the slice's current value, structurally compares the result, and skips the onXChange handler entirely when nothing changed. This removes the class of render loops where auto resets fired change handlers with freshly allocated but semantically identical values (e.g. autoResetExpanded after a data reference change), and deletes the scattered ad-hoc guards that previously protected individual slices. For uncontrolled slices the default handler receives the pre-resolved value, so updaters run exactly once. User handlers and externally owned slices receive the original updater untouched to preserve functional update composition and independent base-atom fallback semantics. Supersedes #6519. Co-Authored-By: Dmitrii Kartashev <dikartashev@gmail.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix test and regen docs * add date filters to filter examples * omit row selection from new check * auto fix lint issues * ci: apply automated fixes * format * lint fix * uncomment * address stale updater bug, simplify * still skip autoResetPageIndex in controlled state scenarios * regen docs again * refactor(table-core): make stateSlicesEqual the setStateSlice default, call unguarded handlers directly setStateSlice now always guards, with isEqual as an override hook for custom feature slices. Slices that deliberately skip guarding (rowSelection, columnSizing, columnResizing, globalFilter, and the expanded/cellSelection setters) call their change handler directly instead of routing through a no-op wrapper, keeping pointer-frequency paths free of the routing overhead. rowPinning picks up the guard via the new default, matching columnPinning. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Dmitrii Kartashev <dikartashev@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> |
History
|
|
|---|---|---|
| .. | ||
| app | ||
| index.html | ||
| main.ts | ||
| styles.css | ||