From ad6ee6a82fad32bcc3cf14cf5b1ec7f749b82623 Mon Sep 17 00:00:00 2001 From: Connor Abbas Date: Sat, 11 Jan 2025 22:43:35 +0000 Subject: [PATCH] composable fix --- resources/js/Composables/usePaginatedData.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/resources/js/Composables/usePaginatedData.ts b/resources/js/Composables/usePaginatedData.ts index 02a7083d..110eebcf 100644 --- a/resources/js/Composables/usePaginatedData.ts +++ b/resources/js/Composables/usePaginatedData.ts @@ -110,9 +110,14 @@ export function usePaginatedData( function reset() { window.history.replaceState(null, '', window.location.pathname); filters.value = defaultFilters; - sorting.value.field = ''; - sorting.value.order = 1; - pagination.value.page = 1; + sorting.value = { + field: '', + order: 1, + }; + pagination.value = { + page: 1, + rows: initialsRows, + }; router.reload({ only: ['request', ...new Set(only)], });