1
1
import { ref , computed , onMounted } from 'vue' ;
2
2
import { router } from '@inertiajs/vue3' ;
3
+ import type { Page , PageProps , Errors } from '@inertiajs/core' ;
3
4
import { FilterMatchMode } from '@primevue/core/api' ;
4
5
import debounce from 'lodash-es/debounce' ;
5
6
import { PageState , DataTablePageEvent } from 'primevue' ;
@@ -62,8 +63,8 @@ export function usePaginatedData(
62
63
const params = qs . parse ( queryString , {
63
64
ignoreQueryPrefix : true ,
64
65
strictNullHandling : true ,
65
- // set empty string values to null to match Laravel backend behavior
66
66
decoder : function ( str , defaultDecoder ) {
67
+ // set empty string values to null to match Laravel backend behavior
67
68
const value = defaultDecoder ( str ) ;
68
69
return value === '' ? null : value ;
69
70
} ,
@@ -80,8 +81,8 @@ export function usePaginatedData(
80
81
}
81
82
82
83
function fetchData ( options : {
83
- onSuccess ?: ( page : any ) => void ;
84
- onError ?: ( errors : any ) => void ;
84
+ onSuccess ?: ( page : Page < PageProps > ) => void ;
85
+ onError ?: ( errors : Errors ) => void ;
85
86
onFinish ?: ( ) => void ;
86
87
} = { } ) {
87
88
const { onSuccess : successCallback , onError : errorCallback , onFinish : finishCallback } = options ;
0 commit comments