From ad46e0799c4e0e108b207cf491865e0c70574ae5 Mon Sep 17 00:00:00 2001 From: ArneBo Date: Wed, 12 Feb 2025 12:01:54 +0100 Subject: [PATCH] fix(front/ui): default empty values for inputs --- front/src/components/library/Albums.vue | 2 +- front/src/components/ui/Pagination.vue | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/front/src/components/library/Albums.vue b/front/src/components/library/Albums.vue index cc373f1b2..85a365614 100644 --- a/front/src/components/library/Albums.vue +++ b/front/src/components/library/Albums.vue @@ -55,7 +55,7 @@ const tagList = computed(() => ({ })) const q = useRouteQuery('query', '') -const query = ref(q.value) +const query = ref(q.value ?? '') syncRef(q, query, { direction: 'ltr' }) const result = ref() diff --git a/front/src/components/ui/Pagination.vue b/front/src/components/ui/Pagination.vue index 788fcfe56..fb9a59597 100644 --- a/front/src/components/ui/Pagination.vue +++ b/front/src/components/ui/Pagination.vue @@ -20,7 +20,7 @@ const page = defineModel('page', { validator: (value: number) => value > 0 }) -const goTo = ref() +const goTo = ref(1) const range = (start: number, end: number) => Array.from({ length: end - start + 1 }, (_, i) => i + start) @@ -105,10 +105,11 @@ const setPage = () => { +
{{ t('vui.go-to') }}