Skip to content

Commit 506d247

Browse files
committed
fix: 🐛 dataGrid column setter diff
1 parent b91ad17 commit 506d247

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

apps/builder/src/utils/evaluateDynamicString/dynamicConverter.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {
22
getStringSnippets,
33
isDynamicStringSnippet,
44
} from "@illa-public/dynamic-string"
5+
import { merge } from "lodash-es"
56
import { ILLAEditorRuntimePropsCollectorInstance } from "../executionTreeHelper/runtimePropsCollector"
67
import { evalScript } from "./codeSandbox"
78
import { substituteDynamicBindingWithValues } from "./valueConverter"
@@ -32,10 +33,11 @@ export const getDynamicValue = (
3233
dataTree: Record<string, any>,
3334
) => {
3435
const { jsSnippets, stringSnippets } = getSnippets(dynamicString)
35-
const calcContext = {
36-
...dataTree,
37-
...ILLAEditorRuntimePropsCollectorInstance.getThirdPartyPackages(),
38-
}
36+
const calcContext = merge(
37+
{},
38+
dataTree,
39+
ILLAEditorRuntimePropsCollectorInstance.getThirdPartyPackages(),
40+
)
3941
if (stringSnippets.length) {
4042
let context: Record<string, unknown> = {}
4143
const values = jsSnippets.map((jsSnippet, index) => {

0 commit comments

Comments
 (0)