Skip to content

Commit

Permalink
fix: Ensure space and plot subcomponent are not rerendered on step
Browse files Browse the repository at this point in the history
Fixes #1867.
  • Loading branch information
rht authored and tpike3 committed Nov 10, 2023
1 parent bee3abb commit 15b7aee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mesa/experimental/jupyter_viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ def make_model():
def handle_change_model_params(name: str, value: any):
set_model_parameters({**model_parameters, name: value})

@solara.component
def ColorCard(color, layout_type):
# TODO: turn this into a Solara component, but must pass in current
# step as a dependency for the plots, so that there is no flickering
# due to rerender.
with rv.Card(
style_=f"background-color: {color}; width: 100%; height: 100%"
) as main:
Expand Down

0 comments on commit 15b7aee

Please sign in to comment.