Skip to content

Commit 3e71f23

Browse files
authored
Merge pull request #112 from KazanExpress/dev
Fix #108 [lib]: now for real
2 parents e225495 + 9006cd9 commit 3e71f23

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/vue-simple-suggest.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,10 +315,13 @@ export default {
315315
})
316316
},
317317
select (item) {
318-
if (this.selected !== item) {
318+
if (this.selected !== item || (this.nullableSelect && !item)) {
319319
this.selected = item
320320
this.$emit('select', item)
321-
this.setText(this.displayProperty(item))
321+
322+
if (item) {
323+
this.setText(this.displayProperty(item))
324+
}
322325
}
323326
324327
this.hover(null)
@@ -391,7 +394,7 @@ export default {
391394
if (hasKeyCode([select, hideList], e)) {
392395
e.preventDefault()
393396
if (this.listShown) {
394-
if (hasKeyCode(select, e) && (this.nullableSelect || this.hovered)) {
397+
if (hasKeyCode(select, e)) {
395398
this.select(this.hovered)
396399
}
397400

0 commit comments

Comments
 (0)