Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(MdRadio): object support #1771

Merged
merged 1 commit into from
Jun 7, 2018
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions docs/app/pages/Components/Radio/Radio.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@
props: [
{
name: 'value',
type: 'String|Number|Boolean',
type: 'String|Number|Boolean|Object',
description: 'The value of the radio',
defaults: 'on'
},
{
name: 'v-model',
type: 'String|Number|Boolean',
type: 'String|Number|Boolean|Object',
description: 'The model variable to bind the selection value. If no value is assigned, then it will use the same behaviour of a regular input[type="radio"].',
defaults: 'null'
},
Expand Down
4 changes: 4 additions & 0 deletions docs/app/pages/Components/Radio/examples/RegularRadio.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<div>
<md-radio v-model="radio" :value="false">Boolean</md-radio>
<md-radio v-model="radio" value="my-radio">String</md-radio>
<md-radio v-model="radio" :value="objA">Object A</md-radio>
<md-radio v-model="radio" :value="objB">Object B</md-radio>
<md-radio v-model="radio">No Value</md-radio>
<md-radio v-model="radio" disabled>Disabled</md-radio>

Expand All @@ -13,6 +15,8 @@
export default {
name: 'RegularRadio',
data: () => ({
objA: { name: 'a' },
objB: { name: 'b' },
radio: false
})
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/MdRadio/MdRadio.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
MdRipple
},
props: {
model: [String, Number, Boolean],
model: [String, Number, Boolean, Object],
value: {
type: [String, Number, Boolean],
type: [String, Number, Boolean, Object],
default: 'on'
},
id: {
Expand Down