Skip to content

Commit

Permalink
fix: Multiselect - correctly default to locale when selectedItemsLabe…
Browse files Browse the repository at this point in the history
…l is not specified.

chore: update docs
closes #6303
  • Loading branch information
avramz committed Sep 16, 2024
1 parent ea59ca3 commit 46452f6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions apps/showcase/doc/common/apidoc/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -40412,7 +40412,7 @@
"readonly": false,
"type": "string",
"default": "'{0} items selected'",
"description": "Label to display after exceeding max selected labels."
"description": "Label to display after exceeding max selected labels. Defaults to value from PrimeVue locale configuration."
},
{
"name": "maxSelectedLabels",
Expand Down Expand Up @@ -94997,4 +94997,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion packages/primevue/scripts/components/multiselect.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ const MultiSelectProps = [
name: 'selectedItemsLabel',
type: 'string',
default: '{0} items selected',
description: 'Label to display after exceeding max selected labels.'
description: 'Label to display after exceeding max selected labels. Defaults to value from PrimeVue locale configuration.'
},
{
name: 'maxSelectedLabels',
Expand Down
2 changes: 1 addition & 1 deletion packages/primevue/src/multiselect/BaseMultiSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default {
},
selectedItemsLabel: {
type: String,
default: '{0} items selected'
default: null
},
maxSelectedLabels: {
type: Number,
Expand Down
4 changes: 2 additions & 2 deletions packages/primevue/src/multiselect/MultiSelect.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ export interface MultiSelectProps {
display?: 'comma' | 'chip' | undefined;
/**
* Label to display after exceeding max selected labels.
* @defaultValue '{0} items selected'
* @defaultValue 'null'
*/
selectedItemsLabel?: string | undefined;
/**
Expand Down Expand Up @@ -524,7 +524,7 @@ export interface MultiSelectProps {
filterMessage?: string | undefined;
/**
* Text to be displayed in hidden accessible field when options are selected. Defaults to value from PrimeVue locale configuration.
* @defaultValue '{0} items selected'
* @defaultValue 'null'
*/
selectionMessage?: string | undefined;
/**
Expand Down

0 comments on commit 46452f6

Please sign in to comment.