Skip to content

Commit 31eb623

Browse files
authored
[docs] add note about initially selected value
Closes #7430
1 parent 3c11c48 commit 31eb623

File tree

1 file changed

+1
-1
lines changed
  • site/content/tutorial/06-bindings/06-select-bindings

1 file changed

+1
-1
lines changed

site/content/tutorial/06-bindings/06-select-bindings/text.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ We can also use `bind:value` with `<select>` elements. Update line 20:
1010

1111
Note that the `<option>` values are objects rather than strings. Svelte doesn't mind.
1212

13-
> Because we haven't set an initial value of `selected`, the binding will set it to the default value (the first in the list) automatically. Be careful though — until the binding is initialised, `selected` remains undefined, so we can't blindly reference e.g. `selected.id` in the template.
13+
> Because we haven't set an initial value of `selected`, the binding will set it to the default value (the first in the list) automatically. Be careful though — until the binding is initialised, `selected` remains undefined, so we can't blindly reference e.g. `selected.id` in the template. If your use case allows it, you could also set an initial value to bypass this problem.

0 commit comments

Comments
 (0)