diff --git a/components/lib/selectbutton/BaseSelectButton.vue b/components/lib/selectbutton/BaseSelectButton.vue index c2018299f..590fa3792 100644 --- a/components/lib/selectbutton/BaseSelectButton.vue +++ b/components/lib/selectbutton/BaseSelectButton.vue @@ -14,7 +14,7 @@ export default { multiple: Boolean, unselectable: { type: Boolean, - default: false + default: true }, allowEmpty: { type: Boolean, diff --git a/components/lib/selectbutton/SelectButton.d.ts b/components/lib/selectbutton/SelectButton.d.ts index e8c1a6369..31890a734 100755 --- a/components/lib/selectbutton/SelectButton.d.ts +++ b/components/lib/selectbutton/SelectButton.d.ts @@ -155,8 +155,8 @@ export interface SelectButtonProps { */ dataKey?: string | undefined; /** - * Whether selection can not be cleared. - * @defaultValue false + * Whether selection can be cleared. + * @defaultValue true * @deprecated Use 'allowEmpty' property instead. */ unselectable?: boolean | undefined; diff --git a/components/lib/selectbutton/SelectButton.vue b/components/lib/selectbutton/SelectButton.vue index 08ea3fc7b..5da48a5f0 100755 --- a/components/lib/selectbutton/SelectButton.vue +++ b/components/lib/selectbutton/SelectButton.vue @@ -81,7 +81,7 @@ export default { let selected = this.isSelected(option); - if (selected && (this.unselectable || !this.allowEmpty)) { + if (selected && !(this.unselectable && this.allowEmpty)) { return; }