mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-25 08:06:48 +08:00
### What problem does this PR solve? Feat:: Use useWatch to synchronize the form data to canvas zustand #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -4,6 +4,7 @@ import { Handle, NodeProps, Position } from '@xyflow/react';
|
||||
import { Flex } from 'antd';
|
||||
import classNames from 'classnames';
|
||||
import get from 'lodash/get';
|
||||
import { memo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import {
|
||||
BeginQueryType,
|
||||
@ -17,7 +18,7 @@ import { RightHandleStyle } from './handle-icon';
|
||||
import styles from './index.less';
|
||||
|
||||
// TODO: do not allow other nodes to connect to this node
|
||||
export function BeginNode({ selected, data }: NodeProps<IBeginNode>) {
|
||||
function Node({ selected, data }: NodeProps<IBeginNode>) {
|
||||
const { t } = useTranslation();
|
||||
const query: BeginQuery[] = get(data, 'form.query', []);
|
||||
const { theme } = useTheme();
|
||||
@ -70,3 +71,5 @@ export function BeginNode({ selected, data }: NodeProps<IBeginNode>) {
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
export const BeginNode = memo(Node);
|
||||
|
||||
Reference in New Issue
Block a user