From 6f5649c6ba89cd8d37d8439afe4386f7a859f719 Mon Sep 17 00:00:00 2001 From: Kyle Shockey Date: Thu, 30 Nov 2017 17:28:35 -0800 Subject: [PATCH] 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. --- src/core/plugins/oas3/components/servers.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/plugins/oas3/components/servers.jsx b/src/core/plugins/oas3/components/servers.jsx index 1e941b38..d6ed4a63 100644 --- a/src/core/plugins/oas3/components/servers.jsx +++ b/src/core/plugins/oas3/components/servers.jsx @@ -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"))