diff --git a/packages/react-components/src/trace-explorer/trace-explorer-opened-traces-widget.tsx b/packages/react-components/src/trace-explorer/trace-explorer-opened-traces-widget.tsx index 2941118c4..77a08c5fd 100644 --- a/packages/react-components/src/trace-explorer/trace-explorer-opened-traces-widget.tsx +++ b/packages/react-components/src/trace-explorer/trace-explorer-opened-traces-widget.tsx @@ -51,7 +51,7 @@ export class ReactOpenTracesWidget extends React.Component { this._experimentManager = this.props.tspClientProvider.getExperimentManager(); }); - this.state = { openedExperiments: [], selectedExperimentIndex: 0 }; + this.state = { openedExperiments: [], selectedExperimentIndex: -1 }; } componentDidMount(): void { @@ -267,7 +267,7 @@ export class ReactOpenTracesWidget extends React.Component 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)); }