Skip to content

Commit

Permalink
Merge pull request #15 from FiretronP75/patch-2
Browse files Browse the repository at this point in the history
Made MdTextarea work with v-model
  • Loading branch information
Mattonit committed May 18, 2018
2 parents 929a5a5 + c7fed82 commit fc38fa6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/MdTextarea.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div :class="wrapperClass">
<i v-if="icon" :class="iconClass"/>
<textarea :is="tag" :class="className" :type="type" :placeholder="placeholder" :disabled="disabled" @focus="focus" @blur="blur" ref="input" :rows="rows"/>
<textarea :is="tag" :class="className" :type="type" :placeholder="placeholder" :disabled="disabled" @focus="focus" @blur="blur" ref="input" :rows="rows" @input="$emit('input', $event.target.value)">{{value}}</textarea>
<label v-if="label" :class="labelClass" ref="label" @click="focus">{{label}}
</label><slot></slot>
</div>
Expand Down Expand Up @@ -35,6 +35,10 @@ export default {
},
rows: {
type: Number
},
value: {
type: String,
default: ''
}
},
data() {
Expand Down

0 comments on commit fc38fa6

Please sign in to comment.