mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-23 08:56:42 +08:00
Fix flickering document count and total when toggling file filter on search page (#17161)
This commit is contained in:
@@ -1075,7 +1075,7 @@ export const useSelectTestingResult = (): ITestingResult => {
|
||||
return mutation.state.data;
|
||||
},
|
||||
});
|
||||
return (data.at(-1) ?? {
|
||||
return (data.filter((x) => x !== undefined).at(-1) ?? {
|
||||
chunks: [],
|
||||
documents: [],
|
||||
total: 0,
|
||||
@@ -1109,7 +1109,7 @@ export const useAllTestingResult = (): ITestingResult => {
|
||||
return mutation.state.data;
|
||||
},
|
||||
});
|
||||
return (data.at(-1) ?? {
|
||||
return (data.filter((x) => x !== undefined).at(-1) ?? {
|
||||
chunks: [],
|
||||
documents: [],
|
||||
total: 0,
|
||||
|
||||
@@ -149,7 +149,6 @@ export const useTestChunkRetrieval = (
|
||||
mutateAsync,
|
||||
} = useMutation({
|
||||
mutationKey: ['testChunk'], // This method is invalid
|
||||
gcTime: 0,
|
||||
mutationFn: async (values: any) => {
|
||||
const { data } = await retrievalTestFunc({
|
||||
page,
|
||||
@@ -200,7 +199,6 @@ export const useTestChunkAllRetrieval = (
|
||||
mutateAsync,
|
||||
} = useMutation({
|
||||
mutationKey: ['testChunkAll'], // This method is invalid
|
||||
gcTime: 0,
|
||||
mutationFn: async (values: any) => {
|
||||
const { data } = await retrievalTestFunc({
|
||||
page,
|
||||
|
||||
Reference in New Issue
Block a user