From 6f40a94b5536b05fe57fa1bb46d7963170630d01 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Mon, 23 Oct 2023 22:40:55 -0300 Subject: [PATCH] update node internals on editNodeModal --- src/frontend/src/modals/EditNodeModal/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/frontend/src/modals/EditNodeModal/index.tsx b/src/frontend/src/modals/EditNodeModal/index.tsx index 04042104e..8d49b23b3 100644 --- a/src/frontend/src/modals/EditNodeModal/index.tsx +++ b/src/frontend/src/modals/EditNodeModal/index.tsx @@ -7,6 +7,7 @@ import { useRef, useState, } from "react"; +import { useUpdateNodeInternals } from "reactflow"; import ShadTooltip from "../../components/ShadTooltipComponent"; import CodeAreaComponent from "../../components/codeAreaComponent"; import DictComponent from "../../components/dictComponent"; @@ -64,6 +65,7 @@ const EditNodeModal = forwardRef( ref ) => { const [modalOpen, setModalOpen] = useState(open ?? false); + const updateNodeInternals = useUpdateNodeInternals(); const myData = useRef(data); @@ -83,6 +85,7 @@ const EditNodeModal = forwardRef( const handleOnNewValue = (newValue: any, name) => { myData.current.node!.template[name].value = newValue; setDataValue(newValue); + updateNodeInternals(data.id); }; useEffect(() => {