This is an automated email from the ASF dual-hosted git repository.

marat pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-karavan.git


The following commit(s) were added to refs/heads/main by this push:
     new 7545a75  Fixed #44 (#49)
7545a75 is described below

commit 7545a7547c013dff3d49330ec360027ec4242ba9
Author: Marat Gubaidullin <[email protected]>
AuthorDate: Wed Oct 27 15:29:18 2021 -0400

    Fixed #44 (#49)
---
 karavan-designer/src/designer/ui/KaravanDesigner.tsx | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/karavan-designer/src/designer/ui/KaravanDesigner.tsx 
b/karavan-designer/src/designer/ui/KaravanDesigner.tsx
index 8d4d325..aa867cd 100644
--- a/karavan-designer/src/designer/ui/KaravanDesigner.tsx
+++ b/karavan-designer/src/designer/ui/KaravanDesigner.tsx
@@ -103,7 +103,13 @@ export class KaravanDesigner extends 
React.Component<Props, State> {
 
     deleteElement = (id: string) => {
         const i = 
CamelApiExt.deleteStepFromIntegration(this.state.integration, id);
-        this.setState({integration: i, showSelector: false, key: 
Math.random().toString()});
+        this.setState({
+            integration: i,
+            showSelector: false,
+            key: Math.random().toString(),
+            selectedStep: undefined,
+            selectedUuid: ''
+        });
     }
 
     selectElement = (element: CamelElement) => {
@@ -138,7 +144,13 @@ export class KaravanDesigner extends 
React.Component<Props, State> {
     addStep = (step: CamelElement, parentId: string) => {
         const i = CamelApiExt.addStepToIntegration(this.state.integration, 
step, parentId);
         const clone = CamelYaml.cloneIntegration(i);
-        this.setState({integration: clone, key: Math.random().toString(), 
showSelector: false})
+        this.setState({
+            integration: clone,
+            key: Math.random().toString(),
+            showSelector: false,
+            selectedStep: step,
+            selectedUuid: step.uuid
+        })
     }
 
     onIntegrationUpdate = (i: Integration) => {

Reply via email to