Fix input fields behavior when node is not selected (#1376)

This commit is contained in:
anovazzi1 2024-01-29 17:41:31 -03:00 committed by GitHub
commit 19e076b4ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);