Skip to content

Commit

Permalink
Fix primefaces#4558 - locale "selectedItemsLabel" is broken on MultiS…
Browse files Browse the repository at this point in the history
…elect
  • Loading branch information
chz committed Oct 10, 2023
1 parent b85876b commit 456d4e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ coverage
dist
.DS_Store
.vscode
.idea
.eslintcache
9 changes: 4 additions & 5 deletions components/lib/multiselect/MultiSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -770,12 +770,11 @@ export default {
},
getSelectedItemsLabel() {
let pattern = /{(.*?)}/;
if (pattern.test(this.selectedItemsLabel)) {
return this.selectedItemsLabel.replace(this.selectedItemsLabel.match(pattern)[0], this.modelValue.length + '');
const selectedItemsLabel = this.$primevue.config.locale.selectedItemsLabel || this.selectedItemsLabel
if (pattern.test(selectedItemsLabel)) {
return selectedItemsLabel.replace(selectedItemsLabel.match(pattern)[0], this.modelValue.length + '');
}
return this.selectedItemsLabel;
return selectedItemsLabel;
},
onToggleAll(event) {
if (this.selectAll !== null) {
Expand Down

0 comments on commit 456d4e3

Please sign in to comment.