-
Notifications
You must be signed in to change notification settings - Fork 11
fix: resolve paneldynamic self-referential binding bug #195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: kc-pit-2026-test
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -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}" | ||||||
| } | ||||||
| ] | ||||||
| }, | ||||||
|
Comment on lines
+298
to
+309
|
||||||
| { | ||||||
| "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", | ||||||
|
||||||
| "title": "For those {network_size_agg} people, please fill in as much of the following information as you are able:\n", | |
| "title": "For those {network_size_list} people, please fill in as much of the following information as you are able:\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
network_size_listis implemented as anexpressionquestion (expression: "{network_size_agg}"). Expression questions continuously recompute their value from the expression, which can overwrite updates coming from the paneldynamicbindings.panelCountwhen panels are added/removed. To make this a true βseed then mutateβ bridge, use a value that is only initialized fromnetwork_size_agg(e.g., a hidden question with a defaultValue/defaultValueExpression) rather than a continuously calculated expression.