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

Clear button flag.

New prop, 'clearable': Can the user clear the selected property?

Usage, :clearable="false" (defaults to true.)

See issue #463.
This commit is contained in:
Damien Bezborodov
2018-02-23 21:57:25 +10:30
parent 546b27d7d2
commit 50c4edef14
+10 -1
View File
@@ -423,6 +423,15 @@
default: false
},
/**
* Can the user clear the selected property?
* @type {Boolean}
*/
clearable: {
type: Boolean,
default: true
},
/**
* Sets the max-height property on the dropdown list.
* @deprecated
@@ -1053,7 +1062,7 @@
* @return {Boolean}
*/
showClearButton() {
return !this.multiple && !this.open && this.mutableValue != null
return !this.multiple && this.clearable && !this.open && this.mutableValue != null
}
},