Skip to content

Commit

Permalink
fix issue where the figure tab does not change when loading a new net…
Browse files Browse the repository at this point in the history
…work
  • Loading branch information
d2fong committed Jun 7, 2022
1 parent c901349 commit 3e79edf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Results/Ndex/NetworkToolbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ const NetworkToolbar = (props) => {
const tab = props.uiState.pathwayFigureTab;

useEffect(() => {
props.uiStateActions.setPathwayFigureSource('loading');
if (tab === 0) {
props.uiStateActions.setPathwayFigureSource('loading');
const { originalCX } = props.network;
if (originalCX !== null) {
const networkAttr = findAttributes(originalCX, 'networkAttributes');
Expand Down
4 changes: 4 additions & 0 deletions src/components/Results/Ndex/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ const Ndex = props => {
nodeCount,
edgeCount
})
// reset pathway figure tab when switching to a new
// network
props.uiStateActions.setPathwayFigureTab(0);
props.uiStateActions.setPathwayFigure(true);
updateHistory(networkUUID)
}

Expand Down

0 comments on commit 3e79edf

Please sign in to comment.