Skip to content

Commit

Permalink
1487-BUG_Details right panel should be empty
Browse files Browse the repository at this point in the history
  • Loading branch information
ychoquet committed Nov 10, 2023
1 parent 53ad436 commit 4e13149
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
12 changes: 6 additions & 6 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,10 @@ export function LayersListFooter(props: TypeLayersListProps): JSX.Element {
if (arrayOfLayerData.length > 0) {
// Check if have the previous selected layer path in incoming arrayOfLayerData
// if so, get the index of the found layer, we need to pass to setLayerDataInfo to load layer in left panel
const commonLayerPathIndex = findLayerPathIndex(arrayOfLayerData, selectedLayerPath);
const commonLayerPathIndex = selectedLayerPath ? findLayerPathIndex(arrayOfLayerData, selectedLayerPath) : -1;
setLayerDataInfo(arrayOfLayerData[commonLayerPathIndex > -1 ? commonLayerPathIndex : 0]);
setSelectedLayerPath(arrayOfLayerData[commonLayerPathIndex > -1 ? commonLayerPathIndex : 0].layerPath);
setCurrentFeatureIndex(0);
}
} else setLayerDataInfo(null);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [arrayOfLayerData]);

Expand Down

0 comments on commit 4e13149

Please sign in to comment.