Feat: Use memo to wrap canvas nodes to improve fluency #3221 (#7929)

### What problem does this PR solve?

Feat: Use memo to wrap canvas nodes to improve fluency #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-05-29 11:10:45 +08:00
committed by GitHub
parent 64f930b1c5
commit 3f695a542c
20 changed files with 78 additions and 28 deletions

View File

@ -6,12 +6,12 @@ import { Handle, NodeProps, Position } from '@xyflow/react';
import { Avatar, Flex } from 'antd';
import classNames from 'classnames';
import { get } from 'lodash';
import { useMemo } from 'react';
import { memo, useMemo } from 'react';
import { LeftHandleStyle, RightHandleStyle } from './handle-icon';
import styles from './index.less';
import NodeHeader from './node-header';
export function RetrievalNode({
function InnerRetrievalNode({
id,
data,
isConnectable = true,
@ -86,3 +86,5 @@ export function RetrievalNode({
</section>
);
}
export const RetrievalNode = memo(InnerRetrievalNode);