mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### 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:
@ -18,7 +18,7 @@ import { RightHandleStyle } from './handle-icon';
|
||||
import styles from './index.less';
|
||||
|
||||
// TODO: do not allow other nodes to connect to this node
|
||||
function Node({ selected, data }: NodeProps<IBeginNode>) {
|
||||
function InnerBeginNode({ selected, data }: NodeProps<IBeginNode>) {
|
||||
const { t } = useTranslation();
|
||||
const query: BeginQuery[] = get(data, 'form.query', []);
|
||||
const { theme } = useTheme();
|
||||
@ -72,4 +72,4 @@ function Node({ selected, data }: NodeProps<IBeginNode>) {
|
||||
);
|
||||
}
|
||||
|
||||
export const BeginNode = memo(Node);
|
||||
export const BeginNode = memo(InnerBeginNode);
|
||||
|
||||
Reference in New Issue
Block a user