From 50c4edef14486c1a3e759c6282723da295f533bd Mon Sep 17 00:00:00 2001 From: Damien Bezborodov Date: Fri, 23 Feb 2018 21:57:25 +1030 Subject: [PATCH] Clear button flag. New prop, 'clearable': Can the user clear the selected property? Usage, :clearable="false" (defaults to true.) See issue #463. --- src/components/Select.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/Select.vue b/src/components/Select.vue index e4e71b1..a0e4ffa 100644 --- a/src/components/Select.vue +++ b/src/components/Select.vue @@ -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 } },