From 617748ae56fe3086583c7330d0b8007ea9521833 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Delafontaine?= Date: Fri, 19 Apr 2024 10:38:11 +0200 Subject: [PATCH] =?UTF-8?q?THE-1268=20focus=20apr=C3=A8s=20lancement=20rec?= =?UTF-8?q?herche?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/results/ResultComponents.vue | 51 +++++++++++-------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/components/common/results/ResultComponents.vue b/components/common/results/ResultComponents.vue index c64a3220..52944ed9 100644 --- a/components/common/results/ResultComponents.vue +++ b/components/common/results/ResultComponents.vue @@ -12,23 +12,25 @@ -
-

- {{ $t("results.searched") }}{{ '\xa0' }} - "{{ persistentQuery }}"{{ '\xa0' }} - {{ $t("results.returned") }}{{ '\xa0' }} - {{ nbResult.toLocaleString("fr-FR") }}{{ '\xa0' }} - {{ $t("results.results") }} -
- - -
-

+
+
+

+ {{ $t("results.searched") }}{{ '\xa0' }} + "{{ persistentQuery }}"{{ '\xa0' }} + {{ $t("results.returned") }}{{ '\xa0' }} + {{ nbResult.toLocaleString("fr-FR") }}{{ '\xa0' }} + {{ $t("results.results") }} +
+ + +
+

+
+

{{ $t("results.searching") }}

-

{{ $t("results.searching") }}

import { useDisplay } from "vuetify"; -import { ref, watch } from "vue"; - +import { onMounted, ref, watch } from "vue"; const currentRoute = useRoute(); const { mobile } = useDisplay(); @@ -102,6 +103,12 @@ const currentPageNumber = currentRoute.query.page ? ref(parseInt(currentRoute.qu const currentShowingNumber = currentRoute.query.nb ? ref(parseInt(currentRoute.query.nb)) : ref(10); const isAdvanced = useState("isAdvanced"); +const returnStatementDiv = ref(null); + +onMounted (() => { + returnStatementDiv.value.focus({ focusVisible: false}); +}); + /** * Fonctions */ @@ -146,6 +153,10 @@ function reinitializePageNumber() { watch(() => props.resetPage, () => { currentPageNumber.value = 1; }); + +watch(() => props.dataReady, () => { + returnStatementDiv.value.focus({ focusVisible: false}); +});