From 204cc34a3900040b687d5650da01c593dbf84a6f Mon Sep 17 00:00:00 2001 From: zhouqiqi01 Date: Mon, 11 Dec 2023 14:56:42 +0800 Subject: [PATCH] =?UTF-8?q?pref:=20=E6=A0=91=E7=BB=84=E4=BB=B6=E5=A4=96?= =?UTF-8?q?=E9=83=A8=E4=BA=8B=E4=BB=B6=E8=A7=A6=E5=8F=91editApi=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=8F=82=E6=95=B0originValue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/amis/src/renderers/Form/InputTree.tsx | 2 +- packages/amis/src/renderers/Form/TreeSelect.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/amis/src/renderers/Form/InputTree.tsx b/packages/amis/src/renderers/Form/InputTree.tsx index 43a985477..d88a3e659 100644 --- a/packages/amis/src/renderers/Form/InputTree.tsx +++ b/packages/amis/src/renderers/Form/InputTree.tsx @@ -283,7 +283,7 @@ export default class TreeControl extends React.Component { const value = hasAbility(item, valueAbility) ? item[valueAbility] : ''; return value === originValue; }); - onEdit && editItem && onEdit(item, editItem, true); + onEdit && editItem && onEdit({...item, originValue}, editItem, true); } @autobind diff --git a/packages/amis/src/renderers/Form/TreeSelect.tsx b/packages/amis/src/renderers/Form/TreeSelect.tsx index 6cc1aae3d..44b3d12ab 100644 --- a/packages/amis/src/renderers/Form/TreeSelect.tsx +++ b/packages/amis/src/renderers/Form/TreeSelect.tsx @@ -539,7 +539,7 @@ export default class TreeSelectControl extends React.Component< const value = hasAbility(item, valueAbility) ? item[valueAbility] : ''; return value === originValue; }); - onEdit && editItem && onEdit(item, editItem, true); + onEdit && editItem && onEdit({...item, originValue}, editItem, true); } @autobind