Skip to content

Commit

Permalink
Fix: missing props in customHandle causing execution failures
Browse files Browse the repository at this point in the history
  • Loading branch information
mahesh-gfx committed Aug 19, 2024
1 parent 91683b8 commit 5db7c3f
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions packages/frontend/src/components/handle/CustomHandle.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
import React, { useEffect } from "react";
import { Handle, Position, useUpdateNodeInternals } from "reactflow";

const CustomHandle = ({ nodeId, type, position, style }: any) => {
const CustomHandle = ({ ...props }: any) => {
const updateNodeInternals = useUpdateNodeInternals();
useEffect(() => {
updateNodeInternals(nodeId);
}, [position]);
return (
<Handle
type={type}
position={position}
style={{
...style,
}}
/>
);
updateNodeInternals(props.nodeId);
}, [props.position]);
return <Handle {...props} />;
};

export default CustomHandle;

0 comments on commit 5db7c3f

Please sign in to comment.