Merge pull request #14441 from Budibase/fix/code-editor-on-change
Change Automations CodeEditorModal to update on close
This commit is contained in:
commit
548940e2e1
|
@ -1065,7 +1065,12 @@
|
||||||
value={inputData[key]}
|
value={inputData[key]}
|
||||||
/>
|
/>
|
||||||
{:else if value.customType === "code"}
|
{:else if value.customType === "code"}
|
||||||
<CodeEditorModal>
|
<CodeEditorModal
|
||||||
|
on:hide={() => {
|
||||||
|
// Push any pending changes when the window closes
|
||||||
|
onChange({ [key]: inputData[key] })
|
||||||
|
}}
|
||||||
|
>
|
||||||
<div class:js-editor={editingJs}>
|
<div class:js-editor={editingJs}>
|
||||||
<div
|
<div
|
||||||
class:js-code={editingJs}
|
class:js-code={editingJs}
|
||||||
|
@ -1075,7 +1080,6 @@
|
||||||
value={inputData[key]}
|
value={inputData[key]}
|
||||||
on:change={e => {
|
on:change={e => {
|
||||||
// need to pass without the value inside
|
// need to pass without the value inside
|
||||||
onChange({ [key]: e.detail })
|
|
||||||
inputData[key] = e.detail
|
inputData[key] = e.detail
|
||||||
}}
|
}}
|
||||||
completions={stepCompletions}
|
completions={stepCompletions}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Modal bind:this={modal}>
|
<Modal bind:this={modal} on:hide>
|
||||||
<ModalContent
|
<ModalContent
|
||||||
size="XL"
|
size="XL"
|
||||||
title="Edit Code"
|
title="Edit Code"
|
||||||
|
|
Loading…
Reference in New Issue