Skip to content

Commit

Permalink
Fix #1161
Browse files Browse the repository at this point in the history
  • Loading branch information
mgubaidullin committed Mar 5, 2024
1 parent f46c7e9 commit 3ce8124
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 3ce8124

Please sign in to comment.