I am trying to implement a simple light/dark theme toggle in 8.0.16.
sun/moon icon depending on the theme being light or dark. I thought this would be simple as I was binding to session.props.theme, but the problem when I call system.perspective.setTheme(‘dark’) the session prop does not update, therefore my “toggle” still thinks its the light theme and cannot toggle back to dark.
if self.session.props.theme == 'light': system.perspective.setTheme('dark') self.props.path = 'fa/sun' else: system.perspective.setTheme('light') self.props.path = 'fa/moon'
I feel like I am missing something very simple here…