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