fix: fixed the issue where ChunkMethodModal cannot correctly display … (#189)

fix: fixed the issue where ChunkMethodModal cannot correctly display the
current chunk method when switching chunk methods between two document
rows.
This commit is contained in:
balibabu
2024-04-01 18:11:07 +08:00
committed by GitHub
parent d5587a7cc1
commit 6cf088911f
7 changed files with 30 additions and 31 deletions

View File

@@ -9,10 +9,9 @@ import { useGetKnowledgeSearchParams } from '@/hooks/routeHook';
import { useOneNamespaceEffectsLoading } from '@/hooks/storeHooks';
import { useFetchTenantInfo } from '@/hooks/userSettingHook';
import { Pagination } from '@/interfaces/common';
import { IKnowledgeFile } from '@/interfaces/database/knowledge';
import { IChangeParserConfigRequestBody } from '@/interfaces/request/document';
import { PaginationProps } from 'antd';
import { useCallback, useEffect, useMemo, useState } from 'react';
import { useCallback, useEffect, useMemo } from 'react';
import { useDispatch, useNavigate, useSelector } from 'umi';
import { KnowledgeRouteKey } from './constant';
@@ -140,18 +139,6 @@ export const useHandleSearchChange = (setPagination: () => void) => {
return { handleInputChange };
};
export const useSetSelectedRecord = () => {
const [currentRecord, setCurrentRecord] = useState<IKnowledgeFile>(
{} as IKnowledgeFile,
);
const setRecord = (record: IKnowledgeFile) => () => {
setCurrentRecord(record);
};
return { currentRecord, setRecord };
};
export const useRenameDocument = (documentId: string) => {
const saveName = useSaveDocumentName();