Skip to content

Commit

Permalink
Merge pull request #4588 from chz/fix/4558
Browse files Browse the repository at this point in the history
Fix #4558 - locale "selectedItemsLabel" is broken on MultiSelect
  • Loading branch information
tugcekucukoglu authored Oct 17, 2023
2 parents a9488af + 8c2b417 commit dfb6c10
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.selectionMessage || this.selectedItemsLabel
if (pattern.test(selectedItemsLabel)) {

Check failure on line 774 in components/lib/multiselect/MultiSelect.vue

View workflow job for this annotation

GitHub Actions / build (16.x)

Expected blank line before this statement

Check failure on line 774 in components/lib/multiselect/MultiSelect.vue

View workflow job for this annotation

GitHub Actions / build (18.x)

Expected blank line before this statement
return selectedItemsLabel.replace(selectedItemsLabel.match(pattern)[0], this.modelValue.length + '');
}
return this.selectedItemsLabel;
return selectedItemsLabel;

Check failure on line 777 in components/lib/multiselect/MultiSelect.vue

View workflow job for this annotation

GitHub Actions / build (16.x)

Expected blank line before this statement

Check failure on line 777 in components/lib/multiselect/MultiSelect.vue

View workflow job for this annotation

GitHub Actions / build (18.x)

Expected blank line before this statement
},
onToggleAll(event) {
if (this.selectAll !== null) {
Expand Down

0 comments on commit dfb6c10

Please sign in to comment.