2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-06-07 07:12:23 +03:00

improving name for should-dropdown-close option. adding test

This commit is contained in:
Kori Roys
2017-04-01 12:07:19 +02:00
parent 897b0d8fb2
commit ecd76ce4dd
3 changed files with 29 additions and 13 deletions
+5 -10
View File
@@ -391,13 +391,13 @@
},
/**
* Allows user to choose to close the select dropdown when an option is selected.
* set to true when multiple=true to close the dropdown between each selection
* Close a dropdown when an option is select. Set to false to keep the dropdown
* open (useful when combined with multi-select, for example)
* @type {Boolean}
*/
closeOnMultiSelect: {
closeOnSelect: {
type: Boolean,
default: false
default: true
},
/**
@@ -635,12 +635,7 @@
* @return {void}
*/
onAfterSelect(option) {
if (this.multiple) {
if (this.closeOnMultiSelect) {
this.open = !this.open
this.$refs.search.blur()
}
} else {
if (this.closeOnSelect) {
this.open = !this.open
this.$refs.search.blur()
}