Skip to content

Commit 6b49a3b

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents 7d18880 + 113680d commit 6b49a3b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

mesa/visualization/solara_viz.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
import copy
2727
import threading
28-
from typing import TYPE_CHECKING
28+
from typing import TYPE_CHECKING, Literal
2929

3030
import reacton.ipywidgets as widgets
3131
import solara
@@ -93,15 +93,16 @@ def Card(
9393
@solara.component
9494
def SolaraViz(
9595
model: "Model" | solara.Reactive["Model"],
96-
components: list[solara.component] | None = None,
96+
components: list[solara.component] | Literal["default"] = "default",
9797
*args,
9898
play_interval=150,
9999
model_params=None,
100100
seed=0,
101101
name: str | None = None,
102102
):
103-
if components is None:
104-
components = []
103+
update_counter.get()
104+
if components == "default":
105+
components = [components_altair.make_space_altair()]
105106

106107
# Convert model to reactive
107108
if not isinstance(model, solara.Reactive):

0 commit comments

Comments
 (0)