From 031e31bf528088430e21d6394dd4fa36a6476281 Mon Sep 17 00:00:00 2001 From: Plumey Simon Date: Mon, 18 Dec 2023 18:14:10 +0100 Subject: [PATCH] Le fix --- resources/js/components/comparaison.vue | 1 + resources/js/components/search-bar.vue | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/js/components/comparaison.vue b/resources/js/components/comparaison.vue index 05010f3..2d2004e 100644 --- a/resources/js/components/comparaison.vue +++ b/resources/js/components/comparaison.vue @@ -43,6 +43,7 @@ const time = ref({ }); function resetFields() { + emit('clear-history'); title.value = '' artist.value.label = 'Artist ?' diff --git a/resources/js/components/search-bar.vue b/resources/js/components/search-bar.vue index b5af554..7264f5d 100644 --- a/resources/js/components/search-bar.vue +++ b/resources/js/components/search-bar.vue @@ -44,7 +44,8 @@ async function sendProposition(songId) { v-on:keyup.enter="songs.length > 0 ? sendProposition(songs[focusIndex].id) : null" v-on:keydown.arrow-up="focusIndex > 0 ? focusIndex-- : null" v-on:keydown.arrow-down="focusIndex < songs.length - 1 ? focusIndex++ : null" class="neon-effect-cyan-off" - type="text" @focusout="songs = [], focusIndex = -1" placeholder="Taper le nom d'une musique"> + v-on:keydown.escape="songs = []" + type="text" @focusout="focusIndex = -1" placeholder="Taper le nom d'une musique">