From 3e9ed60db0fe3e454fe653d1f15e3e558d238f27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9on=20Dumestre?= Date: Sat, 11 Jan 2025 11:04:08 +0000 Subject: [PATCH] fix(nav): clean search field after navigation #2349 Approved-by: VANDERHAGHEN Luc Closes #2349 See merge request 24-heures-insa/overbookd-mono!3169 --- apps/web/layouts/navigation/DesktopSideNav.vue | 9 +++++++-- apps/web/layouts/navigation/SideNavPageItem.vue | 4 ++++ apps/web/layouts/navigation/SideNavPageList.vue | 5 +++++ apps/web/package.json | 2 +- package.json | 2 +- 5 files changed, 18 insertions(+), 4 deletions(-) diff --git a/apps/web/layouts/navigation/DesktopSideNav.vue b/apps/web/layouts/navigation/DesktopSideNav.vue index 5cec863c35..f6cf8b2713 100644 --- a/apps/web/layouts/navigation/DesktopSideNav.vue +++ b/apps/web/layouts/navigation/DesktopSideNav.vue @@ -16,7 +16,11 @@ v-model:search-value="searchValue" :is-folded="isFolded" /> - + navigationBadgeStore.fetchAll()); const isDesktop = computed(() => layoutStore.isDesktop); const isFolded = ref(true); -const searchValue = ref(undefined); +const searchValue = ref(); +const cleanSearchField = () => (searchValue.value = ""); const searchInput = ref(null); const unfocusOnSearch = () => searchInput.value?.blur(); diff --git a/apps/web/layouts/navigation/SideNavPageItem.vue b/apps/web/layouts/navigation/SideNavPageItem.vue index 5e4d563d88..f4a1fe92ca 100644 --- a/apps/web/layouts/navigation/SideNavPageItem.vue +++ b/apps/web/layouts/navigation/SideNavPageItem.vue @@ -9,6 +9,7 @@ 'unfolded-item': !isFolded, }" link + @click="propagateClick" >