Skip to content
This repository has been archived by the owner on Nov 30, 2020. It is now read-only.

Commit

Permalink
fix(select): v-model doesn't work with enhanced select (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
tychenjiajun authored and matsp committed May 14, 2019
1 parent 938ad5c commit 9a48b88
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions components/select/Select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<div
:class="classes"
class="mdc-select"
@MDCSelect:change="onChange"
>
<input
v-if="enhanced && name"
Expand Down Expand Up @@ -40,7 +41,6 @@
:disabled="disabled"
class="mdc-select__native-control"
v-bind="$attrs"
@change="onChange"
>
<option
v-if="$slots['label']"
Expand Down Expand Up @@ -77,7 +77,7 @@ export default {
mixins: [baseComponentMixin, themeClassMixin],
model: {
prop: 'value',
event: 'change'
event: 'model'
},
props: {
disabled: {
Expand Down Expand Up @@ -166,7 +166,8 @@ export default {
},
methods: {
onChange (event) {
this.$emit('change', event.target.value)
this.$emit('change', event.detail)
this.$emit('model', event.detail.value)
},
updateSlots () {
if (this.enhanced && this.$slots.default) {
Expand Down

0 comments on commit 9a48b88

Please sign in to comment.