Skip to content

Commit

Permalink
Update theme switch to session storage
Browse files Browse the repository at this point in the history
  • Loading branch information
antonymilne committed Nov 29, 2023
1 parent 9d7a84c commit 98052ec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vizro-core/src/vizro/models/_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ def _make_page_layout(self, page: Page):
if self.title
else html.Div(hidden=True, id="dashboard_title_outer")
)
theme_switch = daq.BooleanSwitch(id="theme_selector", on=self.theme == "vizro_dark", persistence=True)
theme_switch = daq.BooleanSwitch(
id="theme_selector", on=self.theme == "vizro_dark", persistence=True, persistence_type="session"
)

# Shared across pages but slightly differ in content
page_title = html.H2(children=page.title, id="page_title")
Expand Down

0 comments on commit 98052ec

Please sign in to comment.