Fixed #2617 - The maxSelectedLabels props is not working with 0 value on MultiSelect
parent
8befdb2db1
commit
eb802d4c27
|
@ -647,7 +647,10 @@ export default {
|
|||
let label;
|
||||
|
||||
if (this.modelValue && this.modelValue.length) {
|
||||
if (!this.maxSelectedLabels || this.modelValue.length <= this.maxSelectedLabels) {
|
||||
if (ObjectUtils.isNotEmpty(this.maxSelectedLabels) && this.modelValue.length > this.maxSelectedLabels) {
|
||||
return this.getSelectedItemsLabel();
|
||||
}
|
||||
else {
|
||||
label = '';
|
||||
for(let i = 0; i < this.modelValue.length; i++) {
|
||||
if(i !== 0) {
|
||||
|
@ -657,9 +660,6 @@ export default {
|
|||
label += this.getLabelByValue(this.modelValue[i]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
return this.getSelectedItemsLabel();
|
||||
}
|
||||
}
|
||||
else {
|
||||
label = this.placeholder;
|
||||
|
|
Loading…
Reference in New Issue