Fixed #2617 - The maxSelectedLabels props is not working with 0 value on MultiSelect

pull/2621/head
mertsincan 2022-06-02 10:50:42 +01:00
parent 8befdb2db1
commit eb802d4c27
1 changed files with 4 additions and 4 deletions

View File

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