mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? feat: add RelevantForm #918 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -2,8 +2,12 @@ import { useTranslate } from '@/hooks/commonHooks';
|
||||
import { CloseOutlined } from '@ant-design/icons';
|
||||
import { Button, Card, Form, Input, Select, Typography } from 'antd';
|
||||
import { useUpdateNodeInternals } from 'reactflow';
|
||||
import { Operator } from '../constant';
|
||||
import {
|
||||
useBuildFormSelectOptions,
|
||||
useHandleFormSelectChange,
|
||||
} from '../form-hooks';
|
||||
import { ICategorizeItem } from '../interface';
|
||||
import { useBuildCategorizeToOptions, useHandleToSelectChange } from './hooks';
|
||||
|
||||
interface IProps {
|
||||
nodeId?: string;
|
||||
@ -12,8 +16,11 @@ interface IProps {
|
||||
const DynamicCategorize = ({ nodeId }: IProps) => {
|
||||
const updateNodeInternals = useUpdateNodeInternals();
|
||||
const form = Form.useFormInstance();
|
||||
const buildCategorizeToOptions = useBuildCategorizeToOptions();
|
||||
const { handleSelectChange } = useHandleToSelectChange(nodeId);
|
||||
const buildCategorizeToOptions = useBuildFormSelectOptions(
|
||||
Operator.Categorize,
|
||||
nodeId,
|
||||
);
|
||||
const { handleSelectChange } = useHandleFormSelectChange(nodeId);
|
||||
const { t } = useTranslate('flow');
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user