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 2024/03/05 00:16:44 UTC
(camel-karavan) 03/03: Fix #1161
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
commit 3ce812447ad1403d9b7d5ce4756ba9a0ede9910d
Author: Marat Gubaidullin <ma...@talismancloud.io>
AuthorDate: Mon Mar 4 19:16:13 2024 -0500
Fix #1161
---
.../webui/src/designer/property/property/DslPropertyField.tsx | 8 ++++++--
.../src/designer/property/property/DslPropertyField.tsx | 8 ++++++--
karavan-space/src/designer/property/property/DslPropertyField.tsx | 8 ++++++--
3 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/karavan-app/src/main/webui/src/designer/property/property/DslPropertyField.tsx b/karavan-app/src/main/webui/src/designer/property/property/DslPropertyField.tsx
index a17dc88d..7fc8733d 100644
--- a/karavan-app/src/main/webui/src/designer/property/property/DslPropertyField.tsx
+++ b/karavan-app/src/main/webui/src/designer/property/property/DslPropertyField.tsx
@@ -116,7 +116,7 @@ export function DslPropertyField(props: Props) {
if (checkChanges) {
const interval = setInterval(() => {
if (props.value !== textValue) {
- if (isVariable) {
+ if (isVariable && textValue !== undefined) {
propertyChanged(property.name, variableType.concat(textValue));
} else {
propertyChanged(property.name, textValue);
@@ -312,7 +312,11 @@ export function DslPropertyField(props: Props) {
value={textValue?.toString()}
customIcon={property.type !== 'string' ?
<Text component={TextVariants.p}>{property.type}</Text> : undefined}
- onBlur={_ => propertyChanged(property.name, variableType.concat(textValue))}
+ onBlur={_ => {
+ if (textValue !== undefined) {
+ propertyChanged(property.name, variableType.concat(textValue))
+ }
+ }}
onFocus={_ => setCheckChanges(true)}
onChange={(_, v) => {
setTextValue(v);
diff --git a/karavan-designer/src/designer/property/property/DslPropertyField.tsx b/karavan-designer/src/designer/property/property/DslPropertyField.tsx
index a17dc88d..7fc8733d 100644
--- a/karavan-designer/src/designer/property/property/DslPropertyField.tsx
+++ b/karavan-designer/src/designer/property/property/DslPropertyField.tsx
@@ -116,7 +116,7 @@ export function DslPropertyField(props: Props) {
if (checkChanges) {
const interval = setInterval(() => {
if (props.value !== textValue) {
- if (isVariable) {
+ if (isVariable && textValue !== undefined) {
propertyChanged(property.name, variableType.concat(textValue));
} else {
propertyChanged(property.name, textValue);
@@ -312,7 +312,11 @@ export function DslPropertyField(props: Props) {
value={textValue?.toString()}
customIcon={property.type !== 'string' ?
<Text component={TextVariants.p}>{property.type}</Text> : undefined}
- onBlur={_ => propertyChanged(property.name, variableType.concat(textValue))}
+ onBlur={_ => {
+ if (textValue !== undefined) {
+ propertyChanged(property.name, variableType.concat(textValue))
+ }
+ }}
onFocus={_ => setCheckChanges(true)}
onChange={(_, v) => {
setTextValue(v);
diff --git a/karavan-space/src/designer/property/property/DslPropertyField.tsx b/karavan-space/src/designer/property/property/DslPropertyField.tsx
index a17dc88d..7fc8733d 100644
--- a/karavan-space/src/designer/property/property/DslPropertyField.tsx
+++ b/karavan-space/src/designer/property/property/DslPropertyField.tsx
@@ -116,7 +116,7 @@ export function DslPropertyField(props: Props) {
if (checkChanges) {
const interval = setInterval(() => {
if (props.value !== textValue) {
- if (isVariable) {
+ if (isVariable && textValue !== undefined) {
propertyChanged(property.name, variableType.concat(textValue));
} else {
propertyChanged(property.name, textValue);
@@ -312,7 +312,11 @@ export function DslPropertyField(props: Props) {
value={textValue?.toString()}
customIcon={property.type !== 'string' ?
<Text component={TextVariants.p}>{property.type}</Text> : undefined}
- onBlur={_ => propertyChanged(property.name, variableType.concat(textValue))}
+ onBlur={_ => {
+ if (textValue !== undefined) {
+ propertyChanged(property.name, variableType.concat(textValue))
+ }
+ }}
onFocus={_ => setCheckChanges(true)}
onChange={(_, v) => {
setTextValue(v);