Skip to content

Commit 9d04824

Browse files
VdustRmarcosmoura
authored andcommitted
docs(MdCheckbox): Object supported (vuematerial#1568)
1 parent 33007b4 commit 9d04824

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

docs/app/pages/Components/Checkbox/Checkbox.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@
3737
props: [
3838
{
3939
name: 'v-model',
40-
type: 'String|Number|Boolean|Array',
40+
type: 'String|Number|Object|Boolean|Array',
4141
description: 'The model variable to bind the selection value. If it is an array, it will toggle values inside of it. If no value is assigned, then it will use the same behaviour of a regular input[type="checkbox"].',
4242
defaults: 'null'
4343
},
4444
{
4545
name: 'value',
46-
type: 'String|Number|Boolean',
46+
type: 'String|Number|Object|Boolean',
4747
description: 'The value of the checkbox',
4848
defaults: 'on'
4949
},

docs/app/pages/Components/Checkbox/examples/RegularCheckboxes.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,24 @@
66
<md-checkbox v-model="string" value="my-checkbox">String</md-checkbox>
77
<md-checkbox v-model="novalue">No Value</md-checkbox>
88
<md-checkbox v-model="disabled" disabled>Disabled</md-checkbox>
9+
<md-checkbox v-model="obj" :value="obj1">Object 1</md-checkbox>
10+
<md-checkbox v-model="obj" :value="obj2">Object 2</md-checkbox>
911

1012
<table>
1113
<tr>
1214
<th>Array</th>
1315
<th>Boolean</th>
1416
<th>String</th>
1517
<th>No Value</th>
18+
<th>Object</th>
1619
</tr>
1720

1821
<tr>
1922
<td>{{ array }}</td>
2023
<td>{{ boolean }}</td>
2124
<td>{{ string }}</td>
2225
<td>{{ novalue }}</td>
26+
<td>{{ obj }}</td>
2327
</tr>
2428
</table>
2529
</div>
@@ -33,7 +37,10 @@
3337
boolean: false,
3438
string: null,
3539
novalue: null,
36-
disabled: true
40+
disabled: true,
41+
obj1: {name: 'obj1'},
42+
obj2: {name: 'obj2'},
43+
obj: null
3744
})
3845
}
3946
</script>

0 commit comments

Comments
 (0)