You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before posting an issue, read the FAQ and search the previous issues.
Description
A clear and concise description of what the bug is, and, unless obvious, what you expected instead.
I start the form with skeleton modal.
The form contains one text field, and two Ids (selected via ). If I don't bind the value to the $form.id1 and $form.id2. The select options select automatically the first in the list.
If I do bind:value={$form.id1} the following happens:
The first id is '' (empty string), so the option is not selected, the second is undefined - so the first option in the list is selected.
If I change the id1 and id2 order in the schema declaration z.object({id2, id1}) the behaviour is reversed - the id2 is '' (empty string) and id1 is undefined so it is selected.
If applicable, a MRE
Use one of these stackblitz templates to create a minimal reproducible example that you can link to here:
Zod
Valibot
The text was updated successfully, but these errors were encountered:
Description
A clear and concise description of what the bug is, and, unless obvious, what you expected instead.
I start the form with skeleton modal.
The form contains one text field, and two Ids (selected via ). If I don't bind the value to the $form.id1 and $form.id2. The select options select automatically the first in the list. If I do bind:value={$form.id1} the following happens: The first id is '' (empty string), so the option is not selected, the second is undefined - so the first option in the list is selected. If I change the id1 and id2 order in the schema declaration z.object({id2, id1}) the behaviour is reversed - the id2 is '' (empty string) and id1 is undefined so it is selected. If applicable, a MRE Use one of these stackblitz templates to create a minimal reproducible example that you can link to here: Zod Valibot
The text was updated successfully, but these errors were encountered: