Fixed handle position when adding parameters to node
This commit is contained in:
parent
675b0fb2f6
commit
88095d8896
2 changed files with 2 additions and 1 deletions
|
|
@ -35,7 +35,7 @@ export default function ParameterComponent({
|
||||||
setPosition(ref.current.offsetTop + ref.current.clientHeight / 2);
|
setPosition(ref.current.offsetTop + ref.current.clientHeight / 2);
|
||||||
updateNodeInternals(data.id);
|
updateNodeInternals(data.id);
|
||||||
}
|
}
|
||||||
}, [data.id, ref, updateNodeInternals]);
|
}, [data.id, ref, ref.current, ref.current?.offsetTop, updateNodeInternals]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
updateNodeInternals(data.id);
|
updateNodeInternals(data.id);
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ import {
|
||||||
toTitleCase,
|
toTitleCase,
|
||||||
} from "../../utils";
|
} from "../../utils";
|
||||||
import { typesContext } from "../../contexts/typesContext";
|
import { typesContext } from "../../contexts/typesContext";
|
||||||
|
import { useUpdateNodeInternals } from "reactflow";
|
||||||
const people = [
|
const people = [
|
||||||
{
|
{
|
||||||
name: "Lindsay Walton",
|
name: "Lindsay Walton",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue