From 8ce34612895af489c6755ae3bd262f87fbe1f7bd Mon Sep 17 00:00:00 2001 From: Anbraten <6918444+anbraten@users.noreply.github.com> Date: Tue, 16 Apr 2024 08:53:12 +0200 Subject: [PATCH] fix secrets list loading --- web/src/compositions/usePaginate.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/compositions/usePaginate.ts b/web/src/compositions/usePaginate.ts index 233066146..bdfe58df8 100644 --- a/web/src/compositions/usePaginate.ts +++ b/web/src/compositions/usePaginate.ts @@ -26,7 +26,7 @@ export function usePagination( const hasMore = ref(true); const data = ref([]) as Ref; const loading = ref(false); - const each = ref(_each ?? []); + const each = ref([...(_each ?? [])]); async function loadData() { if (loading.value === true || hasMore.value === false) { @@ -75,7 +75,7 @@ export function usePagination( hasMore.value = true; data.value = []; loading.value = false; - each.value = (_each ?? []) as UnwrapRef; + each.value = [...(_each ?? [])] as UnwrapRef; if (_page === 1) { // we need to reload manually as the page is already 1, so changing won't trigger watcher