From d5a7ba4af2b33d2e550c36619539136a4a3dc554 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sat, 22 Apr 2023 19:54:12 -0500 Subject: [PATCH] Fixed render issue with createFormulaPreview --- src/data/common.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/data/common.tsx b/src/data/common.tsx index ab33aa6..1fdfd61 100644 --- a/src/data/common.tsx +++ b/src/data/common.tsx @@ -462,13 +462,13 @@ export function createFormulaPreview( formula: GenericFormula, showPreview: Computable, previewAmount: Computable = 1 -): ComputedRef { +) { const processedShowPreview = convertComputable(showPreview); const processedPreviewAmount = convertComputable(previewAmount); if (!formula.hasVariable()) { throw new Error("Cannot create formula preview if the formula does not have a variable"); } - return computed(() => { + return jsx(() => { if (unref(processedShowPreview)) { const curr = formatSmall(formula.evaluate()); const preview = formatSmall( @@ -479,16 +479,16 @@ export function createFormulaPreview( ) ) ); - return jsx(() => ( + return ( <> - {curr}→{preview} + {curr} → {preview} - )); + ); } - return formatSmall(formula.evaluate()); + return <>{formatSmall(formula.evaluate())}; }); }