Skip to content

Commit f395d73

Browse files
committed
value -> values for arrayProxy
1 parent f841009 commit f395d73

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/lib/client/proxies.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,12 +242,12 @@ export function arrayProxy<
242242
path: Path
243243
): {
244244
path: Path;
245-
value: Writable<FormPathType<z.infer<UnwrapEffects<T>>, Path>>;
245+
values: Writable<FormPathType<z.infer<UnwrapEffects<T>>, Path>>;
246246
errors: Writable<string[] | undefined>;
247247
} {
248248
return {
249249
path,
250-
value: fieldProxy(superForm.form, path),
250+
values: fieldProxy(superForm.form, path),
251251
errors: fieldProxy(
252252
superForm.errors,
253253
// eslint-disable-next-line @typescript-eslint/no-explicit-any

src/routes/tests/array-component/AutoComplete.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
export let options: { value: string; label: string }[];
1515
export let label = '';
1616
17-
const { value, errors } = arrayProxy(form, field);
17+
const { values, errors } = arrayProxy(form, field);
1818
</script>
1919

2020
{#if label}<label for={field}>{label}</label>{/if}
2121

2222
<!-- Note that the selected attribute is required for this to work without JS -->
23-
<select multiple name={field} bind:value={$value}>
23+
<select multiple name={field} bind:value={$values}>
2424
{#each options as option}
25-
<option value={option.value} selected={$value.includes(option.value)}
25+
<option value={option.value} selected={$values.includes(option.value)}
2626
>{option.label}</option
2727
>
2828
{/each}

0 commit comments

Comments
 (0)