Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

Commit 9abb162

Browse files
authored
Merge pull request #8 from alvarosaburido/bug/input-select-not-working-correctly
Added missing attributes to select options.
2 parents a0c3ad7 + a667545 commit 9abb162

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

dev/App.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ const data = () => ({
8484
{ value: null, text: 'Please select an option' },
8585
{ value: 'arduino', text: 'Arduino' },
8686
{ value: 'transistors', text: 'Transistors' },
87+
{ value: 'resistors', text: 'Resistors', disabled: true },
8788
],
8889
}),
8990
new FormField({

src/components/input-select/InputSelect.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@
55
:name="formControl.name"
66
class="form-control"
77
>
8-
<option v-for="opt in formControl.options" :key="opt.value">
8+
<option
9+
v-for="opt in formControl.options"
10+
:key="opt.text"
11+
:value="opt.value"
12+
:disabled="opt.disabled"
13+
>
914
{{ opt.text }}
1015
</option>
1116
</select>

0 commit comments

Comments
 (0)