Fixed #4631 - SelectButton: unselectable property defect
parent
4e91dcc46c
commit
4736dac5ff
|
@ -14,7 +14,7 @@ export default {
|
|||
multiple: Boolean,
|
||||
unselectable: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
default: true
|
||||
},
|
||||
allowEmpty: {
|
||||
type: Boolean,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -81,7 +81,7 @@ export default {
|
|||
|
||||
let selected = this.isSelected(option);
|
||||
|
||||
if (selected && (this.unselectable || !this.allowEmpty)) {
|
||||
if (selected && !(this.unselectable && this.allowEmpty)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue