From 29082dad00ddaf9540db23238803937ab39fc91f Mon Sep 17 00:00:00 2001 From: ihsankahveci Date: Wed, 11 Mar 2026 01:30:36 -0700 Subject: [PATCH] fix: resolve paneldynamic self-referential binding overwriting network array data MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Break the two-way binding conflict where non_family_network's panelCount bound to itself, causing the numeric count to overwrite the person-object array in 28 survey records. - Rename non_family_network_size → network_size_agg - Rename non_family_network → network_list - Add hidden network_size_list expression as binding intermediary - panelCount now binds to network_size_list instead of self-referencing Co-Authored-By: Claude Opus 4.6 --- client/src/pages/Survey/utils/survey.json | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/client/src/pages/Survey/utils/survey.json b/client/src/pages/Survey/utils/survey.json index 406206f..81a2d9f 100644 --- a/client/src/pages/Survey/utils/survey.json +++ b/client/src/pages/Survey/utils/survey.json @@ -282,7 +282,7 @@ }, { "type": "text", - "name": "non_family_network_size", + "name": "network_size_agg", "title": "Other than any family living with you, how many people do you closely know who are also unhoused or experiencing homelessness today?", "validators": [ { @@ -295,6 +295,18 @@ } ] }, + { + "name": "network_size_bridge", + "title": "Network Module", + "elements": [ + { + "type": "expression", + "name": "network_size_list", + "visible": false, + "expression": "{network_size_agg}" + } + ] + }, { "name": "network_questions_p2", "title": "Network Module", @@ -306,10 +318,10 @@ }, { "type": "paneldynamic", - "name": "non_family_network", - "title": "For those {non_family_network_size} people, please fill in as much of the following information as you are able:\n", + "name": "network_list", + "title": "For those {network_size_agg} people, please fill in as much of the following information as you are able:\n", "bindings": { - "panelCount": "non_family_network" + "panelCount": "network_size_list" }, "templateElements": [ {