From 9ab6e03de393148a3bc7d255a9b81169a0db5a77 Mon Sep 17 00:00:00 2001 From: Alejandro Hernandez Date: Wed, 24 Sep 2025 12:11:44 -0400 Subject: [PATCH] Revert some changes --- packages/client/src/index.js | 11 ++--------- packages/client/src/node.js | 1 - 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/packages/client/src/index.js b/packages/client/src/index.js index f806395eb..54773d94e 100644 --- a/packages/client/src/index.js +++ b/packages/client/src/index.js @@ -139,13 +139,10 @@ export let ContextTree = _.curry( _.map((n) => { // When updated by others, force replace instead of merge response extend(n, { forceReplaceResponse: true }) - }, updatedNodes) + runTypeFunction(types, 'onUpdateByOthers', n, actionProps) + }, _.remove({ path: snapshot(event.path) }, updatedNodes)) ) - for (const n of _.remove({ path: snapshot(event.path) }, updatedNodes)) { - extend(n, { wasUpdatedByOthers: true }) - } - // If disableAutoUpdate but this dispatch affects the target node, update *just* that node (to allow things like paging changes to always go through) // The assumption here is that any event that affects the target node would likely be assumed to take effect immediately by end users if (TreeInstance.disableAutoUpdate && affectsSelf) @@ -232,10 +229,6 @@ export let ContextTree = _.curry( else { target.forceReplaceResponse = false extend(target, responseNode) - if (target.wasUpdatedByOthers) { - delete target.wasUpdatedByOthers - runTypeFunction(types, 'onUpdateByOthers', target, actionProps) - } } if (debug && node._meta) target.metaHistory.push(node._meta) } diff --git a/packages/client/src/node.js b/packages/client/src/node.js index 678745c83..5f22b2015 100644 --- a/packages/client/src/node.js +++ b/packages/client/src/node.js @@ -30,7 +30,6 @@ export let internalStateKeys = [ 'onMarkForUpdate', 'afterSearch', 'forceReplaceResponse', - 'wasUpdatedByOthers', 'expand', 'collapse', ]