fix(search): Fix event search order

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2023-04-26 16:33:11 +02:00
parent 4375438dc9
commit a4e7ee37be
5 changed files with 65 additions and 28 deletions

View File

@@ -39,7 +39,7 @@ import { IAddress } from "@/types/address.model";
import { AddressSearchType } from "@/types/enums";
import { computed, defineAsyncComponent } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
import { useRouter, useRoute } from "vue-router";
import RouteName from "@/router/name";
const FullAddressAutoComplete = defineAsyncComponent(
@@ -53,6 +53,7 @@ const props = defineProps<{
}>();
const router = useRouter();
const route = useRoute();
const emit = defineEmits<{
(event: "update:location", location: IAddress | null): void;
@@ -89,6 +90,7 @@ const submit = () => {
router.push({
name: RouteName.SEARCH,
query: {
...route.query,
locationName: location.value?.locality ?? location.value?.region,
lat,
lon,