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