Skip to content

Commit

Permalink
fix Input takes 2 rows on single selection #22
Browse files Browse the repository at this point in the history
close #22
  • Loading branch information
isneezy committed Feb 13, 2019
1 parent 39ea385 commit 7da9cf8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/VSelectize.vue
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,13 @@ export default {
if (this.$el) {
this.$el.appendChild(this.canvas)
}
// noinspection JSValidateTypes
this.canvas.innerText = (this.searchText || this.placeholder)
this.canvas.innerText = this.selected.length
? this.searchText
: this.placeholder
this.inputWidth = this.canvas.clientWidth + 4
if (this.$el) {
this.$el.removeChild(this.canvas)
}
Expand Down Expand Up @@ -408,6 +412,7 @@ export default {
}
this.searchText = ''
this.emitInput()
this.updateInputWidth()
},
/**
Expand Down

0 comments on commit 7da9cf8

Please sign in to comment.