From f0255d22c1870d8c75f2fcd61b55107bf0931e2b Mon Sep 17 00:00:00 2001 From: Alan Hoskins Date: Fri, 18 Oct 2024 10:38:17 -0400 Subject: [PATCH] fix: make toggling options re-render in playground (solid) (#29) --- playground/src/renderer/solid.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/playground/src/renderer/solid.tsx b/playground/src/renderer/solid.tsx index 496dd20..6077152 100644 --- a/playground/src/renderer/solid.tsx +++ b/playground/src/renderer/solid.tsx @@ -18,6 +18,7 @@ export const createRendererSolid: RendererFactory = (options): RendererFactoryRe const [lang, setLang] = createSignal(props.lang) const [theme, setTheme] = createSignal(props.theme) const [className, setClassName] = createSignal(props.class) + const [options, setOptions] = createSignal(props.options) createEffect(() => { watch(props, () => { @@ -27,6 +28,7 @@ export const createRendererSolid: RendererFactory = (options): RendererFactoryRe setLang(props.lang) setTheme(props.theme) setClassName(props.class) + setOptions(props.options) }) }) @@ -38,7 +40,7 @@ export const createRendererSolid: RendererFactory = (options): RendererFactoryRe class={className()} lang={lang()} theme={theme()} - options={props.options} + options={options()} /> )