From af3f621424cd472c72b54bcdfbed3a4ccc91fd5e Mon Sep 17 00:00:00 2001 From: Li Ming Date: Wed, 22 May 2024 19:17:29 +0800 Subject: [PATCH] =?UTF-8?q?fix(runtime:react):=20update=20page=E6=97=B6?= =?UTF-8?q?=E5=87=BA=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- runtime/react/playground/main.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/runtime/react/playground/main.tsx b/runtime/react/playground/main.tsx index 4cdd834d..b6e13b0e 100644 --- a/runtime/react/playground/main.tsx +++ b/runtime/react/playground/main.tsx @@ -113,8 +113,9 @@ const operations = { updateConfig(root); }, - update({ config, root }: UpdateData) { - replaceChildNode(app.dataSourceManager?.compiledNode(config, undefined, true) || config, root.items); + update({ config, root, parentId}: UpdateData) { + const newNode = app.dataSourceManager?.compiledNode(config, undefined, true) || config; + replaceChildNode(newNode, [root], parentId); updateConfig(cloneDeep(root)); },