Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: Select bindings
title: Select 요소 바인딩
---

We can also use `bind:value` with `<select>` elements:
`<select>` 요소에서도 `bind:value`를 사용할 수 있습니다.

```svelte
/// file: App.svelte
Expand All @@ -12,6 +12,6 @@ We can also use `bind:value` with `<select>` elements:
>
```

Note that the `<option>` values are objects rather than strings. Svelte doesn't mind.
`<option>` 값이 문자열이 아닌 객체라는 점에 주의하세요. 스벨트는 이를 문제 삼지 않습니다.

> 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.
> `selected`의 초기 값을 설정하지 않았기 때문에, 바인딩은 이를 기본값(목록의 첫 번째 값)으로 자동 설정합니다. 하지만 바인딩이 초기화될 때까지 `selected`undefined 상태이므로, 템플릿에서 `selected.id` 등을 맹목적으로 참조할 수 없다는 점을 주의하세요.