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, multiple: Boolean,
unselectable: { unselectable: {
type: Boolean, type: Boolean,
default: false default: true
}, },
allowEmpty: { allowEmpty: {
type: Boolean, type: Boolean,

View File

@ -155,8 +155,8 @@ export interface SelectButtonProps {
*/ */
dataKey?: string | undefined; dataKey?: string | undefined;
/** /**
* Whether selection can not be cleared. * Whether selection can be cleared.
* @defaultValue false * @defaultValue true
* @deprecated Use 'allowEmpty' property instead. * @deprecated Use 'allowEmpty' property instead.
*/ */
unselectable?: boolean | undefined; unselectable?: boolean | undefined;

View File

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