You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ma...@apache.org on 2021/10/27 19:29:20 UTC
[camel-karavan] branch main updated: Fixed #44 (#49)
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 <ma...@gmail.com>
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) => {