Skip to content
Snippets Groups Projects
Unverified Commit 0dd5b58d authored by balibabu's avatar balibabu Committed by GitHub
Browse files

fix: fixed an issue where an error was reported when fetching the file list...

fix: fixed an issue where an error was reported when fetching the file list after changing the parsing type (#150)
parent 0629847c
No related branches found
No related tags found
No related merge requests found
......@@ -44,6 +44,7 @@ import {
} from 'react';
import { Link, useDispatch, useNavigate } from 'umi';
import { useSetDocumentParser } from '@/hooks/documentHooks';
import styles from './index.less';
const { Dragger } = Upload;
......@@ -66,21 +67,14 @@ const UploaderItem = ({
const { parserConfig, defaultParserId } = useGetDocumentDefaultParser();
const { removeDocument } = useDeleteDocumentById();
const [value, setValue] = useState(defaultParserId);
const dispatch = useDispatch();
const setDocumentParser = useSetDocumentParser();
const documentId = file?.response?.id;
const parserList = useSelectParserList();
const saveParser = (parserId: string) => {
dispatch({
type: 'kFModel/document_change_parser',
payload: {
parser_id: parserId,
doc_id: documentId,
parser_config: parserConfig,
},
});
setDocumentParser(parserId, documentId, parserConfig as any);
};
const onChange = (e: RadioChangeEvent) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment