Skip to content

fix(angular): ensure table options updates are not missed during first mount window - #6534

Merged
KevinVandy merged 5 commits into
mainfrom
codex/6530-fix
Aug 13, 2026
Merged

fix(angular): ensure table options updates are not missed during first mount window#6534
KevinVandy merged 5 commits into
mainfrom
codex/6530-fix

Conversation

@riccardoperra

@riccardoperra riccardoperra commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

This pull request addresses a key issue in the @tanstack/angular-table package where options updates could be missed during the initial mount of a table. The changes ensure that option updates are reliably captured from the very first render, and also refactor the lazy initialization logic to provide more robust state tracking and improved test coverage.

Core improvements to options reactivity and initialization:

  • The injectTable function now uses a computed signal for options and ensures updates are not missed during the initial mount, fixing a bug where the first update could be dropped. This involves tracking previous options and applying updates only when they change.
  • The lazyInit utility is refactored to return an object with value, rawValue, and initialized properties, allowing for more precise control and introspection of the lazy initialization state. [1] [2] [3]

Testing and reliability improvements:

  • Additional and updated tests ensure that options updates are not dropped before the effect first runs, and that the new lazy initialization logic behaves correctly and is testable. [1] [2] [3] [4] [5]
  • Minor test and type fixes, such as correcting feature spreading and updating test assertions to match the new initialization API.

Documentation:

  • A changeset is added to document the patch release and the fix for missed options updates on first mount.

Summary by CodeRabbit

  • Bug Fixes

    • Fixed Angular Table options updates during initial rendering so the latest data and configuration are preserved.
    • Improved reactive updates to apply only when table options change.
    • Ensured table cleanup is safe when initialization has not completed.
  • Behavior Updates

    • Lazy table initialization now reports its status and provides access to the initialized value.
    • Required signal inputs can trigger initialization during rendering.
  • Release

    • Prepared a patch release for @tanstack/angular-table.

Loading
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.

3 participants