mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Fix: Resolved the issue where the Generate button must be refreshed after generating chunk to take effect #9869 (#10742)
### What problem does this PR solve? Fix: Resolved the issue where the Generate button must be refreshed after generating chunk to take effect ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -14,6 +14,7 @@ import { useRowSelection } from '@/hooks/logic-hooks/use-row-selection';
|
||||
import { useFetchDocumentList } from '@/hooks/use-document-request';
|
||||
import { useFetchKnowledgeBaseConfiguration } from '@/hooks/use-knowledge-request';
|
||||
import { Upload } from 'lucide-react';
|
||||
import { useMemo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { DatasetTable } from './dataset-table';
|
||||
import Generate from './generate-button/generate';
|
||||
@ -31,7 +32,6 @@ export default function Dataset() {
|
||||
onDocumentUploadOk,
|
||||
documentUploadLoading,
|
||||
} = useHandleUploadDocument();
|
||||
const { data: dataSetData } = useFetchKnowledgeBaseConfiguration();
|
||||
|
||||
const {
|
||||
searchString,
|
||||
@ -43,6 +43,14 @@ export default function Dataset() {
|
||||
handleFilterSubmit,
|
||||
loading,
|
||||
} = useFetchDocumentList();
|
||||
|
||||
const refreshCount = useMemo(() => {
|
||||
return documents.findIndex((doc) => doc.run === '1') + documents.length;
|
||||
}, [documents]);
|
||||
|
||||
const { data: dataSetData } = useFetchKnowledgeBaseConfiguration({
|
||||
refreshCount,
|
||||
});
|
||||
const { filters, onOpenChange } = useSelectDatasetFilters();
|
||||
|
||||
const {
|
||||
|
||||
Reference in New Issue
Block a user