Fixed #4631 - SelectButton: unselectable property defect

pull/4649/head
Tuğçe Küçükoğlu 2023-10-17 09:32:11 +03:00
parent 4e91dcc46c
commit 4736dac5ff
3 changed files with 4 additions and 4 deletions

View File

@ -14,7 +14,7 @@ export default {
multiple: Boolean,
unselectable: {
type: Boolean,
default: false
default: true
},
allowEmpty: {
type: Boolean,

View File

@ -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;

View File

@ -81,7 +81,7 @@ export default {
let selected = this.isSelected(option);
if (selected && (this.unselectable || !this.allowEmpty)) {
if (selected && !(this.unselectable && this.allowEmpty)) {
return;
}