From 6fd1670b92a7f2aa78579db68b05fdef155830e6 Mon Sep 17 00:00:00 2001 From: "alexander.kerscher" Date: Thu, 19 Dec 2024 15:43:53 +0100 Subject: [PATCH] reset search on click fix zoom bug --- frontend/src/App.vue | 7 +++++++ frontend/src/components/app/SearchInputField.vue | 12 ++++-------- frontend/src/components/map/ZaehlstelleMap.vue | 2 ++ frontend/src/store/SearchStore.ts | 9 +++++++++ 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index bb563a3b..96189ff6 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -15,6 +15,7 @@ DAVe @@ -79,6 +80,7 @@ import InfoMessage from "@/components/app/InfoMessage.vue"; import SearchInputField from "@/components/app/SearchInputField.vue"; import VisitHistory from "@/components/app/VisitHistory.vue"; import TheSnackbar from "@/components/common/TheSnackbar.vue"; +import { useSearchStore } from "@/store/SearchStore"; import { useSnackbarStore } from "@/store/SnackbarStore"; import { useUserStore } from "@/store/UserStore"; import SsoUserInfoResponse from "@/types/app/SsoUserInfoResponse"; @@ -93,6 +95,7 @@ const frontendVersion = ref(""); const snackbarStore = useSnackbarStore(); const userStore = useUserStore(); +const searchStore = useSearchStore(); const route = useRoute(); created(); @@ -157,6 +160,10 @@ function shortCuts(event: KeyboardEvent) { } } } + +function resetSearch() { + searchStore.resetAndTriggerSearch(); +}