From d670694361e7bd5fb2323186e02bd822526942a8 Mon Sep 17 00:00:00 2001 From: MrWindlike Date: Fri, 11 Feb 2022 16:18:17 +0800 Subject: [PATCH] fix(editor): auto change selected component id after id changed ISSUE: https://github.com/webzard-io/sunmao-ui/issues/264 --- packages/editor/src/components/ComponentForm/ComponentForm.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/editor/src/components/ComponentForm/ComponentForm.tsx b/packages/editor/src/components/ComponentForm/ComponentForm.tsx index c47be133..a73a1b39 100644 --- a/packages/editor/src/components/ComponentForm/ComponentForm.tsx +++ b/packages/editor/src/components/ComponentForm/ComponentForm.tsx @@ -120,6 +120,7 @@ export const ComponentForm: React.FC = observer(props => { newId: value, }) ); + editorStore.setSelectedComponentId(value); }; const onKeyDown = (e: React.KeyboardEvent) => {