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:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user