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

@@ -36,12 +36,12 @@ import {
useHandleSearchChange,
useNavigateToOtherPage,
useRenameDocument,
useSetSelectedRecord,
} from './hooks';
import ParsingActionCell from './parsing-action-cell';
import ParsingStatusCell from './parsing-status-cell';
import RenameModal from './rename-modal';
import { useSetSelectedRecord } from '@/hooks/logicHooks';
import styles from './index.less';
const KnowledgeFile = () => {
@@ -178,11 +178,8 @@ const KnowledgeFile = () => {
key: 'action',
render: (_, record) => (
<ParsingActionCell
setDocumentAndParserId={setRecord(record)}
showRenameModal={() => {
setRecord(record)();
showRenameModal();
}}
setCurrentRecord={setRecord}
showRenameModal={showRenameModal}
showChangeParserModal={showChangeParserModal}
record={record}
></ParsingActionCell>
@@ -237,6 +234,7 @@ const KnowledgeFile = () => {
onOk={onCreateOk}
/>
<ChunkMethodModal
documentId={currentRecord.id}
parserId={currentRecord.parser_id}
parserConfig={currentRecord.parser_config}
documentExtension={getExtension(currentRecord.name)}