Skip to content

Commit 0b2d250

Browse files
committed
SolaraViz: Reset components when params are changed
1 parent a48dd80 commit 0b2d250

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

mesa/visualization/solara_viz.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,11 @@ def do_reseed():
158158
"""Update the random seed for the model."""
159159
reactive_seed.value = model.random.random()
160160

161-
dependencies = [current_step.value, reactive_seed.value]
161+
dependencies = [
162+
*list(model_parameters.values()),
163+
current_step.value,
164+
reactive_seed.value,
165+
]
162166

163167
# if space drawer is disabled, do not include it
164168
layout_types = [{"Space": "default"}] if space_drawer else []

0 commit comments

Comments
 (0)