refactor(wrapNode): call update dim when node is not initialized
This commit is contained in:
@@ -208,10 +208,10 @@ export default (NodeComponent: ComponentType<NodeComponentProps>) => {
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (nodeElement.current && !isHidden) {
|
||||
if (nodeElement.current && (!isHidden || !isInitialized)) {
|
||||
updateNodeDimensions([{ id, nodeElement: nodeElement.current, forceUpdate: true }]);
|
||||
}
|
||||
}, [id, isHidden, sourcePosition, targetPosition]);
|
||||
}, [id, isHidden, sourcePosition, targetPosition, isInitialized]);
|
||||
|
||||
useEffect(() => {
|
||||
if (nodeElement.current) {
|
||||
|
||||
Reference in New Issue
Block a user