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 2c1c1f6 Call Function to check if integration has node withId from
designer. #577
2c1c1f6 is described below
commit 2c1c1f6e58d8f3e11214852d94b71171904231e9
Author: Marat Gubaidullin <[email protected]>
AuthorDate: Fri Dec 23 14:21:30 2022 -0500
Call Function to check if integration has node withId from designer. #577
---
karavan-designer/src/App.tsx | 2 +-
karavan-designer/src/designer/route/property/DslPropertyField.tsx | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/karavan-designer/src/App.tsx b/karavan-designer/src/App.tsx
index fb876c1..f6897bf 100644
--- a/karavan-designer/src/App.tsx
+++ b/karavan-designer/src/App.tsx
@@ -124,7 +124,7 @@ class App extends React.Component<Props, State> {
save(filename: string, yaml: string, propertyOnly: boolean) {
this.setState({name: filename, yaml: yaml});
- console.log(yaml);
+ // console.log(yaml);
}
getSpinner() {
diff --git a/karavan-designer/src/designer/route/property/DslPropertyField.tsx
b/karavan-designer/src/designer/route/property/DslPropertyField.tsx
index f553cfe..a05575f 100644
--- a/karavan-designer/src/designer/route/property/DslPropertyField.tsx
+++ b/karavan-designer/src/designer/route/property/DslPropertyField.tsx
@@ -116,6 +116,9 @@ export class DslPropertyField extends
React.Component<Props, State> {
}
propertyChanged = (fieldId: string, value: string | number | boolean |
any, newRoute?: RouteToCreate) => {
+ if (fieldId === 'id' &&
CamelDefinitionApiExt.hasElementWithId(this.props.integration, value)) {
+ value = this.props.value;
+ }
this.props.onChange?.call(this, fieldId, value, newRoute);
this.setState({selectStatus: new Map<string, boolean>([[fieldId,
false]])});
}