feat: remove disabled from ChunkMethodModal (#148)
This commit is contained in:
parent
71fe314955
commit
74419e5f0c
@ -36,7 +36,6 @@ interface IProps extends Omit<IModalManagerChildrenProps, 'showModal'> {
|
|||||||
parserId: string;
|
parserId: string;
|
||||||
parserConfig: IKnowledgeFileParserConfig;
|
parserConfig: IKnowledgeFileParserConfig;
|
||||||
documentType: string;
|
documentType: string;
|
||||||
disabled: boolean;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const hidePagesChunkMethods = ['qa', 'table', 'picture', 'resume', 'one'];
|
const hidePagesChunkMethods = ['qa', 'table', 'picture', 'resume', 'one'];
|
||||||
@ -46,7 +45,6 @@ const ChunkMethodModal: React.FC<IProps> = ({
|
|||||||
onOk,
|
onOk,
|
||||||
hideModal,
|
hideModal,
|
||||||
visible,
|
visible,
|
||||||
disabled,
|
|
||||||
documentType,
|
documentType,
|
||||||
parserConfig,
|
parserConfig,
|
||||||
}) => {
|
}) => {
|
||||||
@ -96,7 +94,6 @@ const ChunkMethodModal: React.FC<IProps> = ({
|
|||||||
onOk={handleOk}
|
onOk={handleOk}
|
||||||
onCancel={hideModal}
|
onCancel={hideModal}
|
||||||
afterClose={afterClose}
|
afterClose={afterClose}
|
||||||
okButtonProps={{ disabled }}
|
|
||||||
>
|
>
|
||||||
<Space size={[0, 8]} wrap>
|
<Space size={[0, 8]} wrap>
|
||||||
<div className={styles.tags}>
|
<div className={styles.tags}>
|
||||||
@ -106,9 +103,7 @@ const ChunkMethodModal: React.FC<IProps> = ({
|
|||||||
key={x.value}
|
key={x.value}
|
||||||
checked={selectedTag === x.value}
|
checked={selectedTag === x.value}
|
||||||
onChange={(checked) => {
|
onChange={(checked) => {
|
||||||
if (!disabled) {
|
handleChange(x.value, checked);
|
||||||
handleChange(x.value, checked);
|
|
||||||
}
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{x.label}
|
{x.label}
|
||||||
@ -120,12 +115,7 @@ const ChunkMethodModal: React.FC<IProps> = ({
|
|||||||
<Divider></Divider>
|
<Divider></Divider>
|
||||||
|
|
||||||
{
|
{
|
||||||
<Form
|
<Form name="dynamic_form_nest_item" autoComplete="off" form={form}>
|
||||||
name="dynamic_form_nest_item"
|
|
||||||
autoComplete="off"
|
|
||||||
form={form}
|
|
||||||
disabled={disabled}
|
|
||||||
>
|
|
||||||
{showPages && (
|
{showPages && (
|
||||||
<>
|
<>
|
||||||
<Space>
|
<Space>
|
||||||
|
|||||||
@ -231,7 +231,6 @@ const KnowledgeFile = () => {
|
|||||||
onOk={onChangeParserOk}
|
onOk={onChangeParserOk}
|
||||||
visible={changeParserVisible}
|
visible={changeParserVisible}
|
||||||
hideModal={hideChangeParserModal}
|
hideModal={hideChangeParserModal}
|
||||||
disabled={currentRecord.chunk_num > 0}
|
|
||||||
loading={changeParserLoading}
|
loading={changeParserLoading}
|
||||||
/>
|
/>
|
||||||
<RenameModal
|
<RenameModal
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user