File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed
Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @ryfylke-react/rtk-query-loader" ,
3- "version" : " 0.3.22 " ,
3+ "version" : " 0.3.25 " ,
44 "description" : " Lets you create loaders that contain multiple RTK queries." ,
55 "main" : " ./dist/cjs/index.js" ,
66 "module" : " ./dist/esm/index.js" ,
Original file line number Diff line number Diff line change @@ -95,7 +95,8 @@ export type CreateLoaderArgs<
9595 onLoading ?: ( props : P ) => ReactElement ;
9696 onError ?: (
9797 props : P ,
98- error : FetchBaseQueryError | SerializedError
98+ error : FetchBaseQueryError | SerializedError ,
99+ joinedQuery : UseQueryResult < undefined >
99100 ) => ReactElement ;
100101 onFetching ?: (
101102 props : P ,
@@ -113,7 +114,8 @@ export type Loader<
113114 onLoading ?: ( props : P ) => ReactElement ;
114115 onError ?: (
115116 props : P ,
116- error : SerializedError | FetchBaseQueryError
117+ error : SerializedError | FetchBaseQueryError ,
118+ joinedQuery : UseQueryResult < undefined >
117119 ) => ReactElement ;
118120 onFetching ?: (
119121 props : P ,
Original file line number Diff line number Diff line change @@ -25,9 +25,11 @@ export const withLoader = <
2525 onError = {
2626 args . onError
2727 ? ( error ) =>
28- args . onError ?.( props , error ) ?? (
29- < React . Fragment />
30- )
28+ args . onError ?.(
29+ props ,
30+ error ,
31+ query as Types . UseQueryResult < undefined >
32+ ) ?? < React . Fragment />
3133 : undefined
3234 }
3335 onSuccess = { ( data ) => Component ( props , data ) }
You can’t perform that action at this time.
0 commit comments