Always provide context from form fields regardless of standalone mode to ensure global bindings work when nesting inside a form
This commit is contained in:
parent
f08e528c99
commit
25bfc65764
|
@ -99,8 +99,8 @@
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if !formContext}
|
<Provider data={{ value: fieldState?.value }}>
|
||||||
<Provider data={{ value: fieldState?.value }}>
|
{#if !formContext}
|
||||||
<InnerForm
|
<InnerForm
|
||||||
{disabled}
|
{disabled}
|
||||||
{readonly}
|
{readonly}
|
||||||
|
@ -111,8 +111,7 @@
|
||||||
<slot />
|
<slot />
|
||||||
</svelte:self>
|
</svelte:self>
|
||||||
</InnerForm>
|
</InnerForm>
|
||||||
</Provider>
|
{:else}
|
||||||
{:else}
|
|
||||||
<div
|
<div
|
||||||
class="spectrum-Form-item"
|
class="spectrum-Form-item"
|
||||||
class:span-2={span === 2}
|
class:span-2={span === 2}
|
||||||
|
@ -157,7 +156,8 @@
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
</Provider>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
:global(.form-block .spectrum-Form-item.span-2) {
|
:global(.form-block .spectrum-Form-item.span-2) {
|
||||||
|
|
Loading…
Reference in New Issue