- fixed issue with new table skips decimals;
This commit is contained in:
@@ -34,6 +34,7 @@ import {
|
||||
import renderHtmlContent from '../../helpers/renderHtmlContent';
|
||||
import renderWithDataVars from '../../helpers/renderWithDataVars';
|
||||
import getTokens from '../../helpers/getTokens';
|
||||
import parseCommaDecimal from '../../helpers/parseCommaDecimal';
|
||||
|
||||
const BandoFormsPreview = () => {
|
||||
const { id, formId } = useParams();
|
||||
@@ -105,7 +106,7 @@ const BandoFormsPreview = () => {
|
||||
context = getTokens(formula.value)
|
||||
.filter(v => !['false', 'null', 'true'].includes(v))
|
||||
.reduce((acc, cur) => {
|
||||
acc[cur] = isNil(context[cur]) ? 0 : parseFloat(context[cur]);
|
||||
acc[cur] = isNil(context[cur]) ? 0 : parseCommaDecimal(context[cur]);
|
||||
return acc;
|
||||
}, context);
|
||||
const mathFormula = renderWithDataVars(formula.value, context);
|
||||
|
||||
Reference in New Issue
Block a user