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 28d287f Save on delete (#26)
28d287f is described below
commit 28d287ff455f682551189c3c71741516f17c11de
Author: Marat Gubaidullin <[email protected]>
AuthorDate: Fri Oct 15 14:26:11 2021 -0400
Save on delete (#26)
---
karavan-designer/src/designer/karavan.css | 4 ++++
karavan-designer/src/designer/ui/KaravanDesigner.tsx | 8 ++++----
karavan-vscode/package.json | 2 +-
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/karavan-designer/src/designer/karavan.css
b/karavan-designer/src/designer/karavan.css
index 135bc35..19ed15d 100644
--- a/karavan-designer/src/designer/karavan.css
+++ b/karavan-designer/src/designer/karavan.css
@@ -571,4 +571,8 @@
height: 100%;
width: 100%;
padding-bottom: 100px;
+}
+
+.pf-c-popover__footer {
+ overflow-wrap: anywhere;
}
\ No newline at end of file
diff --git a/karavan-designer/src/designer/ui/KaravanDesigner.tsx
b/karavan-designer/src/designer/ui/KaravanDesigner.tsx
index 00c6d58..ba4bb8a 100644
--- a/karavan-designer/src/designer/ui/KaravanDesigner.tsx
+++ b/karavan-designer/src/designer/ui/KaravanDesigner.tsx
@@ -78,7 +78,7 @@ export class KaravanDesigner extends React.Component<Props,
State> {
}
componentDidUpdate = (prevProps: Readonly<Props>, prevState:
Readonly<State>, snapshot?: any) => {
- if (!Object.is(prevState.integration, this.state.integration)) {
+ if (prevState.key !== this.state.key) {
this.props.onSave?.call(this,
this.state.integration.metadata.name, this.getCode(this.state.integration));
}
}
@@ -98,12 +98,12 @@ export class KaravanDesigner extends React.Component<Props,
State> {
onPropertyUpdate = (element: CamelElement, updatedUuid: string) => {
const clone = CamelYaml.cloneIntegration(this.state.integration);
const i = CamelApiExt.updateIntegration(clone, element, updatedUuid);
- this.setState({integration: i, key: Math.random().toString()})
+ this.setState({integration: i, key: Math.random().toString()});
}
deleteElement = (id: string) => {
const i =
CamelApiExt.deleteStepFromIntegration(this.state.integration, id);
- this.setState({integration: i, showSelector: false})
+ this.setState({integration: i, showSelector: false, key:
Math.random().toString()});
}
selectElement = (element: CamelElement) => {
@@ -142,7 +142,7 @@ export class KaravanDesigner extends React.Component<Props,
State> {
}
onIntegrationUpdate = (i: Integration) => {
- this.setState({integration: i, showSelector: false});
+ this.setState({integration: i, showSelector: false, key:
Math.random().toString()});
};
render() {
diff --git a/karavan-vscode/package.json b/karavan-vscode/package.json
index 6dc4d1a..788ad02 100644
--- a/karavan-vscode/package.json
+++ b/karavan-vscode/package.json
@@ -1,5 +1,5 @@
{
- "name": "karavan-vscode",
+ "name": "camel-karavan",
"publisher": "camel-karavan",
"displayName": "Camel Karavan Designer",
"icon": "icons/icon.png",