Skip to content

Commit

Permalink
Available views cleared when browser refreshed
Browse files Browse the repository at this point in the history
fixes #599

Signed-off-by: hriday-panchasara <hriday.panchasara@ericsson.com>
  • Loading branch information
hriday-panchasara authored and bhufmann committed Dec 15, 2021
1 parent c905240 commit f09bbd0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class ReactOpenTracesWidget extends React.Component<ReactOpenTracesWidget
this.props.tspClientProvider.addTspClientChangeListener(() => {
this._experimentManager = this.props.tspClientProvider.getExperimentManager();
});
this.state = { openedExperiments: [], selectedExperimentIndex: 0 };
this.state = { openedExperiments: [], selectedExperimentIndex: -1 };
}

componentDidMount(): void {
Expand Down Expand Up @@ -267,7 +267,7 @@ export class ReactOpenTracesWidget extends React.Component<ReactOpenTracesWidget
});
const selectedIndex = remoteExperiments.findIndex(experiment => this._selectedExperiment &&
experiment.UUID === this._selectedExperiment.UUID);
this.setState({ openedExperiments: remoteExperiments, selectedExperimentIndex: selectedIndex !== -1 ? selectedIndex : 0 });
this.setState({ openedExperiments: remoteExperiments, selectedExperimentIndex: selectedIndex });
signalManager().fireOpenedTracesChangedSignal(new OpenedTracesUpdatedSignalPayload(remoteExperiments ? remoteExperiments.length : 0));
}

Expand Down

0 comments on commit f09bbd0

Please sign in to comment.