[BTAPP-42] Fix weekly budget remaining not updating after tag edit #46
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "bug/BTAPP-42"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Ticket
BTAPP-42 Weekly budget remaining doesn't update after a tag edit
Summary
TransactionDetailsModal.onSavewas mutating the transaction object in-place (transaction.tags = selectedTags) before passing it toonChange. Since this is the same object reference held in the React Query cache, React Query's structural sharing saw no change and skipped notifying observers — so theamountuseMemo inTransactionsScreennever recomputed.{ ...transaction, tags: selectedTags }toonChangeso a new object reference is created, giving structural sharing something to diff against.