mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-13 20:10:07 +02:00
upgrade and refactor for react-query v5
This commit is contained in:
@@ -163,20 +163,23 @@ export const useVirtualTable = <TFilter extends BaseQuery<any>>({
|
||||
},
|
||||
);
|
||||
|
||||
const results = (await queryClient.fetchQuery(queryKey, async ({ signal }) => {
|
||||
const res = await queryFn!({
|
||||
apiClientProps: {
|
||||
server,
|
||||
signal,
|
||||
},
|
||||
query: {
|
||||
...properties.filter,
|
||||
limit,
|
||||
startIndex,
|
||||
},
|
||||
});
|
||||
const results = (await queryClient.fetchQuery({
|
||||
queryFn: async ({ signal }) => {
|
||||
const res = await queryFn!({
|
||||
apiClientProps: {
|
||||
server,
|
||||
signal,
|
||||
},
|
||||
query: {
|
||||
...properties.filter,
|
||||
limit,
|
||||
startIndex,
|
||||
},
|
||||
});
|
||||
|
||||
return res;
|
||||
return res;
|
||||
},
|
||||
queryKey,
|
||||
})) as BasePaginatedResponse<any>;
|
||||
|
||||
if (isClientSideSort && results?.items) {
|
||||
|
||||
Reference in New Issue
Block a user