fix(OAS3): servers component update on definition change (#6280)
* fix(OAS3): servers component should use nextProps * test(OAS3): cypress tests for selecting multiple servers * test(OAS3): multiple server test with definition change
This commit is contained in:
@@ -30,9 +30,9 @@ export default class Servers extends React.Component {
|
||||
servers,
|
||||
setServerVariableValue,
|
||||
getServerVariable
|
||||
} = this.props
|
||||
} = nextProps
|
||||
|
||||
if(this.props.currentServer !== nextProps.currentServer) {
|
||||
if (this.props.currentServer !== nextProps.currentServer || this.props.servers !== nextProps.servers) {
|
||||
// Server has changed, we may need to set default values
|
||||
let currentServerDefinition = servers
|
||||
.find(v => v.get("url") === nextProps.currentServer)
|
||||
|
||||
Reference in New Issue
Block a user