Replies: 2 comments
-
i haven't tried but i think it'll work fine if you <script>
const data = await someData();
let form_data = $state(Object.fromEntries(Object.keys(data).map((key) => [key, {}])
</script>
<form>
{#each Object.entries(data) as [key, foo] (key)}
<Multiselect id={key} bind:selected={form_data[key]} options={foo.options} ...>
{/each}
</form> |
Beta Was this translation helpful? Give feedback.
0 replies
-
My data is slightly different so I did it like this. thanks anyway though. I used your idea to get it working. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
if I want to generate a form using a for loop in svelte, how do I set up a form to work with this?
something like:
Beta Was this translation helpful? Give feedback.
All reactions