From 43552f95f86f6ad0317788161f3b5448e4c7ddca Mon Sep 17 00:00:00 2001 From: Kyle Mathews Date: Wed, 15 Oct 2025 12:16:14 -0600 Subject: [PATCH] Fix changeset for PR #669 to accurately describe features MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated changeset to correctly describe: - isLoadingSubset property (not isLoadingMore) - loadingSubset:change events - syncMode configuration options - Comprehensive loading state tracking - Enhanced setWindow utility 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .changeset/cruel-buckets-shop.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.changeset/cruel-buckets-shop.md b/.changeset/cruel-buckets-shop.md index b677b56ee..7463b5fc2 100644 --- a/.changeset/cruel-buckets-shop.md +++ b/.changeset/cruel-buckets-shop.md @@ -1,5 +1,14 @@ --- -"@tanstack/db": patch +"@tanstack/db": minor --- -Added `isLoadingMore` property and `loadingMore:change` events to collections and live queries, enabling UIs to display loading indicators when more data is being fetched via `syncMore`. Each live query maintains its own isolated loading state based on its subscriptions, preventing loading status "bleed" between independent queries that share the same source collections. +Added comprehensive loading state tracking and configurable sync modes to collections and live queries: + +- Added `isLoadingSubset` property and `loadingSubset:change` events to all collections for tracking when data is being loaded +- Added `syncMode` configuration option to collections: + - `'eager'` (default): Loads all data immediately during initial sync + - `'on-demand'`: Only loads data as requested via `loadSubset` calls +- Added comprehensive status tracking to collection subscriptions with `status` property (`'ready'` | `'loadingSubset'`) and events (`status:change`, `status:ready`, `status:loadingSubset`, `unsubscribed`) +- Live queries automatically reflect loading state from their source collection subscriptions, with each query maintaining isolated loading state to prevent status "bleed" between independent queries +- Enhanced `setWindow` utility to return `Promise` when loading is triggered, allowing callers to await data loading completion +- Added `subscription` parameter to `loadSubset` handler for advanced sync implementations that need to track subscription lifecycle