From c318c4cedf3f50c21c403649945c2abbbc30a89e Mon Sep 17 00:00:00 2001 From: Terry Truong Date: Sat, 21 Jan 2023 15:23:51 +1100 Subject: Do more minor refactoring Document some variables coupled between client and server. Add more term consistency ('unit', 'event density'). Make console messages more consistent. --- src/components/SearchModal.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/components/SearchModal.vue') diff --git a/src/components/SearchModal.vue b/src/components/SearchModal.vue index ec1b4cd..addb764 100644 --- a/src/components/SearchModal.vue +++ b/src/components/SearchModal.vue @@ -84,7 +84,7 @@ const focusedSuggIdx = ref(null as null | number); // Index of a suggestion sele const lastReqTime = ref(0); const pendingReqParams = ref(null as null | URLSearchParams); // Holds data for latest request to make -const pendingReqInput = ref(''); // Holds the user input associated with pendingReqData +const pendingReqInput = ref(''); // Holds the user input associated with pendingReqParams const pendingDelayedSuggReq = ref(0); // Set via setTimeout() for making a request despite a previous one still waiting async function onInput(){ @@ -213,6 +213,9 @@ async function resolveSearch(eventTitle: string){ // ========== More event handling ========== +// Focus input on mount +onMounted(() => inputRef.value!.focus()) + function onClose(evt: Event){ if (evt.target == rootRef.value){ emit('close'); @@ -236,9 +239,6 @@ function onInfoIconClick(eventTitle: string){ emit('info-click', eventTitle); } -// Focus input on mount -onMounted(() => inputRef.value!.focus()) - // ========== For styles ========== const styles = computed((): Record => { -- cgit v1.2.3