Commit 546c3fc1 by zhaochengxiang

bug fix

parent fc95434e
......@@ -39,6 +39,8 @@ class Relation extends React.Component {
}
}
}
} else {
this.graph?.destroy();
}
if (resize !== prevProps.resize && prevProps.resize!==null) {
......
......@@ -17,7 +17,9 @@ class Thermodynamic extends React.Component {
if (data !== prevProps.data) {
this.graph?.dispose();
if (data) {
this.graph = init(this)(this.elem, data, onClick);
}
} else if (resize !== prevProps.resize) {
this.graph?.resize();
}
......
......@@ -297,6 +297,8 @@ const AssetManageTree = (props) => {
setCurrentDirType(defaultItem.type||'');
setCurrentDir(defaultItem);
onSelect && onSelect(defaultItem.nodeId, defaultItem.type||'', defaultItem.level, defaultItem.allowdLoadDataAsset);
} else {
onSelect && onSelect('', '');
}
}
}
......
......@@ -265,11 +265,10 @@ const AssetTable = (props) => {
}, [])
useEffect(() => {
if (nodeId !== null && nodeId !== undefined) {
setSelectItem({});
setCheckedKeys([]);
setSelectedRows([]);
if (nodeId) {
if (shouldScrollRef.current === true) {
if (remoteRelationRef.current) {
getDataAssetLocationByRelation();
......@@ -280,6 +279,9 @@ const AssetTable = (props) => {
} else {
setPagination({ ...pagination, pageNum: 1 });
}
} else {
setAssets([])
setPagination({ ...pagination, pageNum: 1 });
}
//eslint-disable-next-line react-hooks/exhaustive-deps
}, [ nodeId ])
......
......@@ -272,6 +272,8 @@ const AssetTree = (props) => {
defaultItem = newData[0]
setCurrentDirId(defaultItem.nodeId);
onSelect && onSelect(defaultItem.nodeId, defaultItem.type||'', defaultItem.level, defaultItem.allowdLoadDataAsset);
} else {
onSelect && onSelect('', '')
}
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment