fix(nodes): handle isHidden on start closes #506
This commit is contained in:
@@ -27,8 +27,6 @@ const HiddenFlow = () => {
|
||||
);
|
||||
}, [isHidden]);
|
||||
|
||||
console.log(elements);
|
||||
|
||||
return (
|
||||
<ReactFlow elements={elements} onConnect={onConnect}>
|
||||
<MiniMap />
|
||||
|
||||
@@ -153,7 +153,7 @@ export default (NodeComponent: ComponentType<NodeComponentProps>) => {
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (nodeElement.current) {
|
||||
if (nodeElement.current && !isHidden) {
|
||||
updateNodeDimensions({ id, nodeElement: nodeElement.current });
|
||||
|
||||
const resizeObserver = new ResizeObserver(() => {
|
||||
@@ -172,7 +172,7 @@ export default (NodeComponent: ComponentType<NodeComponentProps>) => {
|
||||
}
|
||||
|
||||
return;
|
||||
}, [id]);
|
||||
}, [id, isHidden]);
|
||||
|
||||
if (isHidden) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user