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