-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
formsStuff relating to forms and form actionsStuff relating to forms and form actions
Description
Describe the bug
form.fields.set({description: 'ssr'}); is server-side rendred, but form.fields.description.set('csr') is not.
<script>
import { editData } from '$lib/data.remote.js';
let { data } = $props();
const form = editData;
form.fields.set({description: 'ssr'});
// Comment this out, and "ssr" is server-side rendered.
// When it is uncommented, "" is server-side rendered and "csr" is set during hydration.
form.fields.description.set('csr');
</script>
<div>
Description: {form.fields.description.value()}
</div>
<form {...form}>
<input {...form.fields.name.as('text')} />
<button type="submit">Submit</button>
</form>Reproduction
https://www.sveltelab.dev/v4da89zpg9l3f0h?files=.%2Fsrc%2Froutes%2F%2Bpage.svelte
Logs
System Info
SvelteLabSeverity
annoyance
Additional Information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
formsStuff relating to forms and form actionsStuff relating to forms and form actions