diff --git a/packages/client/src/components/app/forms/LongFormField.svelte b/packages/client/src/components/app/forms/LongFormField.svelte index 15a10827b2..200e55af41 100644 --- a/packages/client/src/components/app/forms/LongFormField.svelte +++ b/packages/client/src/components/app/forms/LongFormField.svelte @@ -11,6 +11,7 @@ export let validation export let defaultValue = "" export let format = "auto" + export let onChange let fieldState let fieldApi @@ -44,6 +45,13 @@ }, }) } + + const handleChange = e => { + fieldApi.setValue(e.detail) + if (onChange) { + onChange({ value: e.detail }) + } + } fieldApi.setValue(e.detail)} + on:change={handleChange} disabled={fieldState.disabled} error={fieldState.error} id={fieldState.fieldId} @@ -78,7 +86,7 @@ {:else} fieldApi.setValue(e.detail)} + on:change={handleChange} disabled={fieldState.disabled} error={fieldState.error} id={fieldState.fieldId}