Skip to content

Commit c14174f

Browse files
authored
Merge pull request #607 from dnum-mi/fix/label-visible-prop-in-search-bar
fix(DsfrSearchbar): 🐛 corrige le bug de la prop label-visible
2 parents 49ec684 + ccc29c1 commit c14174f

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

src/components/DsfrHeader/DsfrHeaderMenuLink.vue

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export type DsfrHeaderMenuLinkProps = {
1616
}
1717
1818
const props = withDefaults(defineProps<DsfrHeaderMenuLinkProps>(), {
19-
icon: '',
19+
icon: undefined,
2020
iconAttrs: () => ({}),
2121
onClick: () => undefined,
2222
target: '_self',
@@ -66,20 +66,26 @@ const linkData = computed(() => {
6666
:target="target"
6767
@click.stop="onClick"
6868
>
69-
<VIcon
69+
<template
7070
v-if="(icon || iconAttrs) && !iconRight"
71-
:name="icon"
72-
class="fr-mr-1w"
73-
v-bind="iconAttrs"
74-
/>
71+
>
72+
<VIcon
73+
:name="icon"
74+
class="fr-mr-1w"
75+
v-bind="iconAttrs"
76+
/>
77+
</template>
7578

7679
{{ label }}
7780

78-
<VIcon
81+
<template
7982
v-if="(icon || iconAttrs) && iconRight"
80-
:name="icon"
81-
class="fr-ml-1w"
82-
v-bind="iconAttrs"
83-
/>
83+
>
84+
<VIcon
85+
:name="icon"
86+
class="fr-ml-1w"
87+
v-bind="iconAttrs"
88+
/>
89+
</template>
8490
</component>
8591
</template>

src/components/DsfrSearchBar/DsfrSearchBar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ defineEmits<{
3939
type="search"
4040
:placeholder="placeholder"
4141
:model-value="modelValue"
42-
:label-visible="false"
42+
:label-visible="labelVisible"
4343
:label="label"
4444
:disabled="disabled"
4545
@update:model-value="$emit('update:modelValue', $event)"

0 commit comments

Comments
 (0)