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
Copy file name to clipboardExpand all lines: src/content/reference/react-dom/components/option.md
+23-23Lines changed: 23 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -4,12 +4,13 @@ title: "<option>"
4
4
5
5
<Intro>
6
6
7
-
The [built-in browser `<option>` component](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option) lets you render an option inside a [`<select>`](/reference/react-dom/components/select) box.
7
+
[Komponen `<option>` bawaan peramban](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option) memungkinkan Anda untuk me-*render* opsi di dalam kotak [`<select>`](/reference/react-dom/components/select).
8
+
8
9
9
10
```js
10
11
<select>
11
-
<option value="someOption">Some option</option>
12
-
<option value="otherOption">Other option</option>
12
+
<option value="someOption">Sebuah opsi</option>
13
+
<option value="otherOption">Opsi lain</option>
13
14
</select>
14
15
```
15
16
@@ -19,56 +20,56 @@ The [built-in browser `<option>` component](https://developer.mozilla.org/en-US/
19
20
20
21
---
21
22
22
-
## Reference {/*reference*/}
23
+
## Referensi {/*reference*/}
23
24
24
25
### `<option>` {/*option*/}
25
26
26
-
The [built-in browser `<option>`component](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select)lets you render an option inside a[`<select>`](/reference/react-dom/components/select) box.
27
+
[Komponen `<option>`bawaan peramban](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select)memungkinkan Anda untuk me-*render* opsi di dalam kotak[`<select>`](/reference/react-dom/components/select).
27
28
28
29
```js
29
30
<select>
30
-
<option value="someOption">Some option</option>
31
-
<option value="otherOption">Other option</option>
31
+
<option value="someOption">Sebuah opsi</option>
32
+
<option value="otherOption">Opsi lain</option>
32
33
</select>
33
34
```
34
35
35
-
[See more examples below.](#usage)
36
+
[Lihat contoh lebih banyak di bawah ini.](#usage)
36
37
37
38
#### Props {/*props*/}
38
39
39
-
`<option>`supports all [common element props.](/reference/react-dom/components/common#props)
40
+
`<option>`mendukung semua [*props* elemen umum.](/reference/react-dom/components/common#props)
40
41
41
-
Additionally, `<option>`supports these props:
42
+
Sebagai tambahan, `<option>`mendukung *props* berikut:
42
43
43
-
*[`disabled`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option#disabled): A boolean. If`true`, the option will not be selectable and will appear dimmed.
44
-
*[`label`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option#label): A string. Specifies the meaning of the option. If not specified, the text inside the option is used.
45
-
*[`value`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option#value): The value to be used [when submitting the parent `<select>`in a form](/reference/react-dom/components/select#reading-the-select-box-value-when-submitting-a-form)if this option is selected.
44
+
*[`disabled`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option#disabled): Sebuah *boolean*. Jika`true`, opsi akan tidak dapat dipilih dan akan tampak redup.
45
+
*[`label`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option#label): Sebuah *string*. Menentukan arti dari opsi. Jika tidak ditentukan, teks di dalam opsi akan digunakan.
46
+
*[`value`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option#value): Nilai yang akan digunakan [ketika mengirimkan induk `<select>`dalam *form*](/reference/react-dom/components/select#reading-the-select-box-value-when-submitting-a-form)jika opsi ini dipilih.
46
47
47
48
#### Caveats {/*caveats*/}
48
49
49
-
* React does not support the `selected`attribute on `<option>`. Instead, pass this option's `value`to the parent [`<select defaultValue>`](/reference/react-dom/components/select#providing-an-initially-selected-option)for an uncontrolled select box, or[`<select value>`](/reference/react-dom/components/select#controlling-a-select-box-with-a-state-variable)for a controlled select.
50
+
* React tidak mendukung atribut `selected`dalam `<option>`. Sebagai gantinya, oper `value`dari opsi ke elemen induk [`<select defaultValue>`](/reference/react-dom/components/select#providing-an-initially-selected-option)untuk sebuah *uncontrolled select box*, atau[`<select value>`](/reference/react-dom/components/select#controlling-a-select-box-with-a-state-variable)untuk *controlled select*.
50
51
51
52
---
52
53
53
-
## Usage {/*usage*/}
54
+
## Penggunaan {/*usage*/}
54
55
55
-
### Displaying a select box with options {/*displaying-a-select-box-with-options*/}
56
+
### Menampilkan kotak select dengan opsi {/*displaying-a-select-box-with-options*/}
56
57
57
-
Render a`<select>`with a list of `<option>`components inside to display a select box. Give each`<option>`a`value`representing the data to be submitted with the form.
58
+
*Render* sebuah`<select>`dengan daftar komponen `<option>`di dalamnya untuk menampilkan sebuah kotak pilihan. Beri setiap`<option>`sebuah`value`yang merepresentasikan data yang akan dikirim dengan formulir.
58
59
59
-
[Read more about displaying a`<select>`with a list of`<option>` components.](/reference/react-dom/components/select)
60
+
[Baca lebih lanjut mengenai menampilkan`<select>`dengan daftar dari komponen`<option>`.](/reference/react-dom/components/select)
0 commit comments