Commit c3494cf9 by zhaochengxiang

资产定位调整

parent be64a216
...@@ -46,7 +46,6 @@ const AssetTable = (props) => { ...@@ -46,7 +46,6 @@ const AssetTable = (props) => {
const timestamp = getQueryParam(AnchorTimestamp, props.location.search); const timestamp = getQueryParam(AnchorTimestamp, props.location.search);
const shouldScrollRef = useRef(false); const shouldScrollRef = useRef(false);
const urlChangeRef = useRef(false);
const cellCache = new CellMeasurerCache({ const cellCache = new CellMeasurerCache({
fixedWidth: true, fixedWidth: true,
...@@ -57,13 +56,9 @@ const AssetTable = (props) => { ...@@ -57,13 +56,9 @@ const AssetTable = (props) => {
if ((nodeId||'') !== '' ) { if ((nodeId||'') !== '' ) {
if (shouldScrollRef.current === true) { if (shouldScrollRef.current === true) {
urlChangeRef.current = false;
getDataAssetLocation();
} else if (urlChangeRef.current) {
urlChangeRef.current = false; shouldScrollRef.current = false;
getDataAssetLocation();
} else { } else {
...@@ -82,7 +77,6 @@ const AssetTable = (props) => { ...@@ -82,7 +77,6 @@ const AssetTable = (props) => {
if ((anchorId||'') !== '') { if ((anchorId||'') !== '') {
shouldScrollRef.current = true; shouldScrollRef.current = true;
urlChangeRef.current = true;
} }
//eslint-disable-next-line react-hooks/exhaustive-deps //eslint-disable-next-line react-hooks/exhaustive-deps
...@@ -99,16 +93,6 @@ const AssetTable = (props) => { ...@@ -99,16 +93,6 @@ const AssetTable = (props) => {
//eslint-disable-next-line react-hooks/exhaustive-deps //eslint-disable-next-line react-hooks/exhaustive-deps
}, [ keyword, pagination ]) }, [ keyword, pagination ])
useEffect(() => {
if (shouldScrollRef.current) {
var anchor = document.querySelector(`#data-asset-${anchorId}`);
if (anchor) {
shouldScrollRef.current = false;
}
}
})
const getDataAssetLocation = () => { const getDataAssetLocation = () => {
setLoading(true); setLoading(true);
dispatch({ dispatch({
......
...@@ -130,16 +130,6 @@ class MapContent extends React.Component { ...@@ -130,16 +130,6 @@ class MapContent extends React.Component {
}) })
} }
setSquareGraphState = (item) => {
const { breadcrumbContents } = this.state;
this.loadedRowsMap = {};
this.setState({
breadcrumbContents: [...breadcrumbContents, { name: item.dirName || '', data: item }],
curTableModelData: item.children || [],
});
}
handleInfiniteOnLoad = ({ startIndex, stopIndex }) => { handleInfiniteOnLoad = ({ startIndex, stopIndex }) => {
const { haveMoreData, curTableModelData } = this.state; const { haveMoreData, curTableModelData } = this.state;
......
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