pull/2835/head
mertsincan 2022-08-01 00:49:09 +01:00
parent b200a25cb8
commit 31148c1a9a
3 changed files with 5 additions and 3 deletions

View File

@ -584,6 +584,7 @@ export default {
this.unbindOutsideClickListener();
this.unbindScrollListener();
this.unbindResizeListener();
this.$emit('hide');
this.overlay = null;
},
@ -849,7 +850,7 @@ export default {
return this.emptySelectionMessage || this.$primevue.config.locale.emptySelectionMessage;
},
selectedMessageText() {
return ObjectUtils.isNotEmpty(this.modelValue) ? this.selectionMessageText.replaceAll('{0}', '1') : this.emptySelectionMessageText;
return this.hasSelectedOption ? this.selectionMessageText.replaceAll('{0}', '1') : this.emptySelectionMessageText;
},
focusedOptionId() {
return this.focusedOptionIndex !== -1 ? `${this.id}_${this.focusedOptionIndex}` : null;

View File

@ -680,7 +680,7 @@ export default {
return this.emptySelectionMessage || this.$primevue.config.locale.emptySelectionMessage;
},
selectedMessageText() {
return ObjectUtils.isNotEmpty(this.modelValue) ? this.selectionMessageText.replaceAll('{0}', this.multiple ? this.modelValue.length : '1') : this.emptySelectionMessageText;
return this.hasSelectedOption ? this.selectionMessageText.replaceAll('{0}', this.multiple ? this.modelValue.length : '1') : this.emptySelectionMessageText;
},
focusedOptionId() {
return this.focusedOptionIndex !== -1 ? `${this.id}_${this.focusedOptionIndex}` : null;

View File

@ -674,6 +674,7 @@ export default {
this.unbindOutsideClickListener();
this.unbindScrollListener();
this.unbindResizeListener();
this.$emit('hide');
this.overlay = null;
},
@ -1011,7 +1012,7 @@ export default {
return this.emptySelectionMessage || this.$primevue.config.locale.emptySelectionMessage;
},
selectedMessageText() {
return ObjectUtils.isNotEmpty(this.modelValue) ? this.selectionMessageText.replaceAll('{0}', this.modelValue.length) : this.emptySelectionMessageText;
return this.hasSelectedOption ? this.selectionMessageText.replaceAll('{0}', this.modelValue.length) : this.emptySelectionMessageText;
},
focusedOptionId() {
return this.focusedOptionIndex !== -1 ? `${this.id}_${this.focusedOptionIndex}` : null;