From 25bfc65764e4eeeefac045a73d3dfeb006c0a1eb Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 8 Nov 2024 12:15:12 +0000 Subject: [PATCH] Always provide context from form fields regardless of standalone mode to ensure global bindings work when nesting inside a form --- .../src/components/app/forms/Field.svelte | 94 +++++++++---------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/packages/client/src/components/app/forms/Field.svelte b/packages/client/src/components/app/forms/Field.svelte index c9b026d7d3..5fccb5d881 100644 --- a/packages/client/src/components/app/forms/Field.svelte +++ b/packages/client/src/components/app/forms/Field.svelte @@ -99,8 +99,8 @@ }) -{#if !formContext} - + + {#if !formContext} - -{:else} -
- {#key $component.editing} - - {/key} -
- {#if !fieldState} - - {:else if schemaType && schemaType !== type && !["options", "longform"].includes(type)} - - {:else} - - {#if fieldState.error} -
- - {fieldState.error} -
- {:else if helpText} -
- {helpText} -
+ {:else} +
+ {#key $component.editing} + + {/key} +
+ {#if !fieldState} + + {:else if schemaType && schemaType !== type && !["options", "longform"].includes(type)} + + {:else} + + {#if fieldState.error} +
+ + {fieldState.error} +
+ {:else if helpText} +
+ {helpText} +
+ {/if} {/if} - {/if} +
-
-{/if} + {/if} +