fix: chunk editor allows update image only if chunk type is image (#12210)

### What problem does this PR solve?

Disallow updating image on non-image chunk in chunk editor.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Jimmy Ben Klieve
2025-12-25 17:39:43 +08:00
committed by GitHub
parent c20d112f60
commit 7b6ab22b78

View File

@ -168,6 +168,7 @@ const ChunkCreatingModal: React.FC<IModalProps<any> & kFProps> = ({
/> />
)} )}
{isEditMode && form.getValues('doc_type_kwd') === 'image' && (
<FormField <FormField
control={form.control} control={form.control}
name="image" name="image"
@ -205,6 +206,7 @@ const ChunkCreatingModal: React.FC<IModalProps<any> & kFProps> = ({
</FormItem> </FormItem>
)} )}
/> />
)}
<FormField <FormField
control={form.control} control={form.control}