Skip to content

Commit 034f845

Browse files
author
pablohpsilva
committed
enhancing the documentation and adding mdOption value prop to accept object
1 parent 488769c commit 034f845

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

docs/src/pages/components/Select.vue

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,18 @@
327327
</div>
328328

329329
<div>Selected users: {{ users }}</div>
330+
331+
<div class="field-group">
332+
<md-input-container>
333+
<label for="users">Users</label>
334+
<md-select name="option" id="option" multiple v-model="items">
335+
<md-option v-for="option in options"
336+
:key="option"
337+
:value="option">
338+
{{ option.name }}
339+
</md-option>
340+
</md-input-container>
341+
</div>
330342

331343
</div>
332344

@@ -404,7 +416,15 @@
404416
users: [
405417
'jim_halpert',
406418
'michael_scott'
407-
]
419+
],
420+
options: [
421+
{ id: 1, name: 'a' },
422+
{ id: 2, name: 'b' },
423+
{ id: 3, name: 'c' },
424+
{ id: 4, name: 'd' },
425+
{ id: 5, name: 'e' }
426+
],
427+
items: []
408428
}),
409429
methods: {
410430
setPulpFiction() {

src/components/mdSelect/mdOption.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
2222
export default {
2323
props: {
24-
value: [String, Boolean, Number]
24+
value: [String, Boolean, Number, Object]
2525
},
2626
data: () => ({
2727
parentSelect: {},

0 commit comments

Comments
 (0)