We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e908677 commit 0030083Copy full SHA for 0030083
src/components/MdChips/MdChips.vue
@@ -16,7 +16,7 @@
16
17
<md-input
18
ref="input"
19
- v-model.trim="inputValue"
+ v-model="inputValue"
20
v-if="!mdStatic && modelRespectLimit"
21
:type="mdInputType"
22
:id="id"
@@ -69,17 +69,18 @@
69
}
70
},
71
methods: {
72
- insertChip ({ target }) {
+ insertChip () {
73
+ let value = this.inputValue.trim()
74
if (
- !this.inputValue ||
75
- this.value.includes(this.inputValue) ||
+ !value ||
76
+ this.value.includes(value) ||
77
!this.modelRespectLimit
78
) {
79
return
80
- this.value.push(this.inputValue)
81
+ this.value.push(value)
82
this.$emit('input', this.value)
- this.$emit('md-insert', this.inputValue)
83
+ this.$emit('md-insert', value)
84
this.inputValue = ''
85
86
removeChip (chip) {
0 commit comments