You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow an alternative way of using withEntitiesLoadingCall, that receives a factory function like with withCalls, this has the advantage of allowing us to use the store in the onSuccess and onError
example
withEntitiesLoadingCall(({ entitiesPagedRequest, entitiesFilter, se }) => ({
fetchEntities: async () => {
const res = await lastValueFrom(
inject(BranchService).getBranches({
search: entitiesFilter().search,
skip: entitiesPagedRequest().startIndex,
take: entitiesPagedRequest().size,
}),
);
return { entities: res.resultList };
},
onSuccess: ({ entities }) => {
// call the store signals.computed or methods or patchState
}
})),
The text was updated successfully, but these errors were encountered:
…ction for config
the factory function config will receive the store , and allow access to it in the fetchEntities,
onSuccess and onErro methods
Fix#95
…ction for config
the factory function config will receive the store , and allow access to it in the fetchEntities,
onSuccess and onErro methods
Fix#95
Allow an alternative way of using withEntitiesLoadingCall, that receives a factory function like with withCalls, this has the advantage of allowing us to use the store in the onSuccess and onError
example
withEntitiesLoadingCall(({ entitiesPagedRequest, entitiesFilter, se }) => ({
fetchEntities: async () => {
const res = await lastValueFrom(
inject(BranchService).getBranches({
search: entitiesFilter().search,
skip: entitiesPagedRequest().startIndex,
take: entitiesPagedRequest().size,
}),
);
return { entities: res.resultList };
},
onSuccess: ({ entities }) => {
// call the store signals.computed or methods or patchState
}
})),
The text was updated successfully, but these errors were encountered: