Only set the first server as current if we...

...don't already have a currentServer.

This avoids having the selected server reset each time the
operation is expanded, or the Try-It-Out mode is entered.
This commit is contained in:
Kyle Shockey
2017-11-30 17:28:35 -08:00
parent d7d061b5af
commit 6f5649c6ba

View File

@@ -15,7 +15,11 @@ export default class Servers extends React.Component {
}
componentDidMount() {
let { servers } = this.props
let { servers, currentServer } = this.props
if(currentServer) {
return
}
//fire 'change' event to set default 'value' of select
this.setServer(servers.first().get("url"))