@@ -37,9 +37,12 @@ const props = withDefaults(defineProps<DsfrHeaderProps>(), {
3737})
3838
3939const emit = defineEmits <{
40- (e : ' update:modelValue' , payload : string ): void
41- (e : ' search' , payload : string ): void
42- (e : ' languageSelect' , payload : DsfrLanguageSelectorElement ): void
40+ /** Émis lors du changement de la valeur de recherche */
41+ ' update:modelValue' : [payload : string | number | undefined ]
42+ /** Émis lors de la validation de la recherche */
43+ search: [payload : string ]
44+ /** Émis lors de la sélection d'une langue */
45+ languageSelect: [payload : DsfrLanguageSelectorElement ]
4346}>()
4447
4548const slots = defineSlots <{
@@ -240,10 +243,10 @@ provide(registerNavigationLinkKey, () => {
240243 <DsfrSearchBar
241244 :id =" searchbarId"
242245 :label =" searchLabel"
243- :model-value =" modelValue"
246+ :model-value =" String( modelValue || '') "
244247 :placeholder =" placeholder"
245248 style =" justify-content : flex-end "
246- @update:model-value =" emit('update:modelValue', $event)"
249+ @update:model-value =" emit('update:modelValue', $event! )"
247250 @search =" emit('search', $event)"
248251 />
249252 </div >
@@ -308,7 +311,7 @@ provide(registerNavigationLinkKey, () => {
308311 >
309312 <DsfrSearchBar
310313 :searchbar-id =" searchbarId"
311- :model-value =" modelValue"
314+ :model-value =" String( modelValue || '') "
312315 :placeholder =" placeholder"
313316 @update:model-value =" emit('update:modelValue', $event)"
314317 @search =" emit('search', $event)"
0 commit comments