Fixed handle position when adding parameters to node

This commit is contained in:
Lucas Oliveira 2023-05-31 16:12:25 -03:00
commit 88095d8896
2 changed files with 2 additions and 1 deletions

View file

@ -35,7 +35,7 @@ export default function ParameterComponent({
setPosition(ref.current.offsetTop + ref.current.clientHeight / 2);
updateNodeInternals(data.id);
}
}, [data.id, ref, updateNodeInternals]);
}, [data.id, ref, ref.current, ref.current?.offsetTop, updateNodeInternals]);
useEffect(() => {
updateNodeInternals(data.id);

View file

@ -17,6 +17,7 @@ import {
toTitleCase,
} from "../../utils";
import { typesContext } from "../../contexts/typesContext";
import { useUpdateNodeInternals } from "reactflow";
const people = [
{
name: "Lindsay Walton",