Skip to content

Commit 4baaea7

Browse files
authored
fixes
1 parent 5cfc919 commit 4baaea7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

resources/js/composables/usePaginatedData.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { ref, computed, onMounted } from 'vue';
22
import { router } from '@inertiajs/vue3';
3+
import type { Page, PageProps, Errors } from '@inertiajs/core';
34
import { FilterMatchMode } from '@primevue/core/api';
45
import debounce from 'lodash-es/debounce';
56
import { PageState, DataTablePageEvent } from 'primevue';
@@ -62,8 +63,8 @@ export function usePaginatedData(
6263
const params = qs.parse(queryString, {
6364
ignoreQueryPrefix: true,
6465
strictNullHandling: true,
65-
// set empty string values to null to match Laravel backend behavior
6666
decoder: function (str, defaultDecoder) {
67+
// set empty string values to null to match Laravel backend behavior
6768
const value = defaultDecoder(str);
6869
return value === '' ? null : value;
6970
},
@@ -80,8 +81,8 @@ export function usePaginatedData(
8081
}
8182

8283
function fetchData(options: {
83-
onSuccess?: (page: any) => void;
84-
onError?: (errors: any) => void;
84+
onSuccess?: (page: Page<PageProps>) => void;
85+
onError?: (errors: Errors) => void;
8586
onFinish?: () => void;
8687
} = {}) {
8788
const { onSuccess: successCallback, onError: errorCallback, onFinish: finishCallback } = options;

0 commit comments

Comments
 (0)