You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the context of React, if you are trying to dynamically adjust the theme when a user toggles dark/light mode on your page, you can do this in a non-standard-react way.
useEffect(() => {
if (prevThemeMode.current !== themeMode) {
// there is no built in way to dynamically update the theme, and we don't want to destroy/repaint the entire calendar as that leads to some odd behaviors
// @ts-ignore
calInstance.calendarPainter.root?.attr('data-theme', themeMode);
prevThemeMode.current = themeMode;
}
}, [themeMode, prevThemeMode]);
Calling
paint({ theme: THEME })
does not update the calendar to the given themeThe text was updated successfully, but these errors were encountered: