Refactor
parent
b200a25cb8
commit
31148c1a9a
|
@ -584,6 +584,7 @@ export default {
|
||||||
this.unbindOutsideClickListener();
|
this.unbindOutsideClickListener();
|
||||||
this.unbindScrollListener();
|
this.unbindScrollListener();
|
||||||
this.unbindResizeListener();
|
this.unbindResizeListener();
|
||||||
|
|
||||||
this.$emit('hide');
|
this.$emit('hide');
|
||||||
this.overlay = null;
|
this.overlay = null;
|
||||||
},
|
},
|
||||||
|
@ -849,7 +850,7 @@ export default {
|
||||||
return this.emptySelectionMessage || this.$primevue.config.locale.emptySelectionMessage;
|
return this.emptySelectionMessage || this.$primevue.config.locale.emptySelectionMessage;
|
||||||
},
|
},
|
||||||
selectedMessageText() {
|
selectedMessageText() {
|
||||||
return ObjectUtils.isNotEmpty(this.modelValue) ? this.selectionMessageText.replaceAll('{0}', '1') : this.emptySelectionMessageText;
|
return this.hasSelectedOption ? this.selectionMessageText.replaceAll('{0}', '1') : this.emptySelectionMessageText;
|
||||||
},
|
},
|
||||||
focusedOptionId() {
|
focusedOptionId() {
|
||||||
return this.focusedOptionIndex !== -1 ? `${this.id}_${this.focusedOptionIndex}` : null;
|
return this.focusedOptionIndex !== -1 ? `${this.id}_${this.focusedOptionIndex}` : null;
|
||||||
|
|
|
@ -680,7 +680,7 @@ export default {
|
||||||
return this.emptySelectionMessage || this.$primevue.config.locale.emptySelectionMessage;
|
return this.emptySelectionMessage || this.$primevue.config.locale.emptySelectionMessage;
|
||||||
},
|
},
|
||||||
selectedMessageText() {
|
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() {
|
focusedOptionId() {
|
||||||
return this.focusedOptionIndex !== -1 ? `${this.id}_${this.focusedOptionIndex}` : null;
|
return this.focusedOptionIndex !== -1 ? `${this.id}_${this.focusedOptionIndex}` : null;
|
||||||
|
|
|
@ -674,6 +674,7 @@ export default {
|
||||||
this.unbindOutsideClickListener();
|
this.unbindOutsideClickListener();
|
||||||
this.unbindScrollListener();
|
this.unbindScrollListener();
|
||||||
this.unbindResizeListener();
|
this.unbindResizeListener();
|
||||||
|
|
||||||
this.$emit('hide');
|
this.$emit('hide');
|
||||||
this.overlay = null;
|
this.overlay = null;
|
||||||
},
|
},
|
||||||
|
@ -1011,7 +1012,7 @@ export default {
|
||||||
return this.emptySelectionMessage || this.$primevue.config.locale.emptySelectionMessage;
|
return this.emptySelectionMessage || this.$primevue.config.locale.emptySelectionMessage;
|
||||||
},
|
},
|
||||||
selectedMessageText() {
|
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() {
|
focusedOptionId() {
|
||||||
return this.focusedOptionIndex !== -1 ? `${this.id}_${this.focusedOptionIndex}` : null;
|
return this.focusedOptionIndex !== -1 ? `${this.id}_${this.focusedOptionIndex}` : null;
|
||||||
|
|
Loading…
Reference in New Issue