We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 62c88be + e2f196c commit fd37823Copy full SHA for fd37823
src/components/DsfrLanguageSelector/DsfrLanguageSelector.vue
@@ -38,6 +38,9 @@ export default defineComponent({
38
}
39
return baseStyle
40
},
41
+ currentLanguageObject () {
42
+ return this.languages.find(({ codeIso }) => codeIso === this.currentLanguage)
43
+ },
44
45
watch: {
46
expanded (isExpanded) {
@@ -71,7 +74,7 @@ export default defineComponent({
71
74
type="button"
72
75
@click.prevent.stop="expanded = !expanded"
73
76
>
- {{ languages[0].codeIso.toUpperCase() }}<span class="fr-hidden-lg"> - {{ languages[0].label }}</span>
77
+ {{ currentLanguageObject.codeIso.toUpperCase() }}<span class="fr-hidden-lg"> - {{ currentLanguageObject.label }}</span>
78
</button>
79
<div
80
:id="id"
0 commit comments