From 2aa273166d7743e19cdfe6f7782a247581dfdef0 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Mon, 29 Jan 2024 17:36:00 -0300 Subject: [PATCH] Fix input fields behavior when node is not selected --- src/frontend/src/CustomNodes/GenericNode/index.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/frontend/src/CustomNodes/GenericNode/index.tsx b/src/frontend/src/CustomNodes/GenericNode/index.tsx index ea9f49845..c8f2d2349 100644 --- a/src/frontend/src/CustomNodes/GenericNode/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/index.tsx @@ -80,6 +80,13 @@ export default function GenericNode({ countHandles(); }, [data, data.node]); + useEffect(() => { + if (!selected) { + setInputName(false); + setInputDescription(false); + } + }, [selected]); + // State for outline color const sseData = useFlowStore((state) => state.sseData); const isBuilding = useFlowStore((state) => state.isBuilding);