mirror of
https://github.com/tenrok/vue-select.git
synced 2026-05-29 05:14:04 +03:00
open dropdown on focus, don't pop values on second return hit, reset typeaheadpointer on filtered options change
This commit is contained in:
Vendored
+10526
-4
File diff suppressed because one or more lines are too long
@@ -121,6 +121,7 @@
|
|||||||
@keydown.down.prevent="typeAheadDown"
|
@keydown.down.prevent="typeAheadDown"
|
||||||
@keydown.enter.prevent="typeAheadSelect"
|
@keydown.enter.prevent="typeAheadSelect"
|
||||||
@blur="open = false"
|
@blur="open = false"
|
||||||
|
@focus="open = true"
|
||||||
type="search"
|
type="search"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
:placeholder="searchPlaceholder"
|
:placeholder="searchPlaceholder"
|
||||||
@@ -194,6 +195,9 @@
|
|||||||
},
|
},
|
||||||
multiple( val ) {
|
multiple( val ) {
|
||||||
this.$set('value', val ? [] : null)
|
this.$set('value', val ? [] : null)
|
||||||
|
},
|
||||||
|
filteredOptions() {
|
||||||
|
this.typeAheadPointer = 0;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -212,9 +216,9 @@
|
|||||||
this.value = option
|
this.value = option
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this.multiple) {
|
// if (this.multiple) {
|
||||||
this.value.$remove(option)
|
// this.value.$remove(option)
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.multiple) {
|
if (!this.multiple) {
|
||||||
|
|||||||
Reference in New Issue
Block a user