diff --git a/packages/builder/src/components/common/bindings/DrawerBindableInput.svelte b/packages/builder/src/components/common/bindings/DrawerBindableInput.svelte index b8d418c62b..22d322985d 100644 --- a/packages/builder/src/components/common/bindings/DrawerBindableInput.svelte +++ b/packages/builder/src/components/common/bindings/DrawerBindableInput.svelte @@ -23,6 +23,7 @@ const dispatch = createEventDispatcher() let bindingDrawer let valid = true + let currentVal = value $: readableValue = runtimeToReadableBinding(bindings, value) $: tempValue = readableValue @@ -30,11 +31,17 @@ const saveBinding = () => { onChange(tempValue) + onBlur() bindingDrawer.hide() } const onChange = value => { - dispatch("change", readableToRuntimeBinding(bindings, value)) + currentVal = readableToRuntimeBinding(bindings, value) + dispatch("change", currentVal) + } + + const onBlur = () => { + dispatch("blur", currentVal) } @@ -45,6 +52,7 @@ readonly={isJS} value={isJS ? "(JavaScript function)" : readableValue} on:change={event => onChange(event.detail)} + on:blur={onBlur} {placeholder} {updateOnChange} /> diff --git a/packages/builder/src/components/integration/KeyValueBuilder.svelte b/packages/builder/src/components/integration/KeyValueBuilder.svelte index 4ffb380aa4..28db6b61c6 100644 --- a/packages/builder/src/components/integration/KeyValueBuilder.svelte +++ b/packages/builder/src/components/integration/KeyValueBuilder.svelte @@ -107,7 +107,7 @@ placeholder={keyPlaceholder} readonly={readOnly} bind:value={field.name} - on:change={changed} + on:blur={changed} /> {#if options} +