From 7b5650d098d876dcdc62ec8becefdc5d76d48994 Mon Sep 17 00:00:00 2001 From: Momentry Studio Date: Sat, 25 Jul 2026 13:25:41 +0800 Subject: [PATCH] fix: correct updateClusterAfterMerge to trigger computed update Problem: - Previous commit tried to splice computed property (clusterAsPending) - Computed properties cannot be modified directly - Need to update underlying data (clusterResultsCache) Solution: - Remove incorrect clusterAsPending.value.splice() - Trigger reactive update via clusterResultsCache reassignment - clusterAsPending computed will auto-update Technical details: - Vue computed properties are read-only - Must modify underlying reactive data - Reassignment triggers computed recalculation --- src/views/PeopleView.vue | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/views/PeopleView.vue b/src/views/PeopleView.vue index cd9e919..3c1011b 100644 --- a/src/views/PeopleView.vue +++ b/src/views/PeopleView.vue @@ -1611,14 +1611,11 @@ function updateClusterAfterMerge(sourceGroupId: string, targetGroupId: string) { const idx = clusters.findIndex((c: any) => c.identity_uuid === sourceGroupId) if (idx >= 0) { - clusters.splice(idx, 1) // ← Remove empty source group + clusters.splice(idx, 1) // Remove empty source group from cache } - } - - // Also remove from clusterAsPending computed - const idx2 = clusterAsPending.value.findIndex((c: any) => c.identity_uuid === sourceGroupId) - if (idx2 >= 0) { - clusterAsPending.value.splice(idx2, 1) + + // Trigger computed property update + clusterResultsCache.value = { ...clusterResultsCache.value } } }