github TanStack/db @tanstack/db@0.5.13

latest releases: @tanstack/rxdb-db-collection@0.1.47, @tanstack/solid-db@0.1.58, @tanstack/query-db-collection@1.0.11...
8 hours ago

Patch Changes

  • Allow rows to be deleted by key by using the write function passed to a collection's sync function. (#1003)

  • fix: deleted items not disappearing from live queries with .limit() (#1044)

    Fixed a bug where deleting an item from a live query with .orderBy() and .limit() would not remove it from the query results. The subscribeChanges callback would never fire with a delete event.

    The issue was caused by duplicate inserts reaching the D2 pipeline, which corrupted the multiplicity tracking used by TopKWithFractionalIndexOperator. A delete would decrement multiplicity from 2 to 1 instead of 1 to 0, so the item remained visible.

    Fixed by ensuring sentKeys is updated before callbacks execute (preventing race conditions) and filtering duplicate inserts in filterAndFlipChanges.

Don't miss a new db release

NewReleases is sending notifications on new releases.