Fixed #4631 - SelectButton: unselectable property defect
parent
4e91dcc46c
commit
4736dac5ff
|
@ -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,
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue