Feat: Upload files on the data flow page #9869 (#10153)

### What problem does this PR solve?

Feat: Upload files on the data flow page #9869

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-09-18 16:19:53 +08:00
committed by GitHub
parent e82617f6de
commit 5c1791d7f0
9 changed files with 112 additions and 157 deletions

View File

@ -11,7 +11,7 @@ import { ControllerRenderProps, useFormContext } from 'react-hook-form';
type RAGFlowFormItemProps = {
name: string;
label: ReactNode;
label?: ReactNode;
tooltip?: ReactNode;
children: ReactNode | ((field: ControllerRenderProps) => ReactNode);
horizontal?: boolean;
@ -39,13 +39,15 @@ export function RAGFlowFormItem({
'flex items-center': horizontal,
})}
>
<FormLabel
required={required}
tooltip={tooltip}
className={cn({ 'w-1/4': horizontal }, labelClassName)}
>
{label}
</FormLabel>
{label && (
<FormLabel
required={required}
tooltip={tooltip}
className={cn({ 'w-1/4': horizontal }, labelClassName)}
>
{label}
</FormLabel>
)}
<FormControl>
{typeof children === 'function'
? children(field)