Merge branch 'master' into array-model-markdown-description
This commit is contained in:
@@ -69,7 +69,10 @@ export default class BaseLayout extends React.Component {
|
||||
<div className="scheme-container">
|
||||
<Col className="schemes wrapper" mobile={12}>
|
||||
{ schemes && schemes.size ? (
|
||||
<Schemes schemes={ schemes } specActions={ specActions } />
|
||||
<Schemes
|
||||
currentScheme={specSelectors.operationScheme()}
|
||||
schemes={ schemes }
|
||||
specActions={ specActions } />
|
||||
) : null }
|
||||
|
||||
{ securityDefinitions ? (
|
||||
|
||||
@@ -229,7 +229,7 @@ export default class Operation extends PureComponent {
|
||||
path={ path }
|
||||
method={ method }
|
||||
specActions={ specActions }
|
||||
operationScheme={ operationScheme } />
|
||||
currentScheme={ operationScheme } />
|
||||
</div> : null
|
||||
}
|
||||
|
||||
|
||||
@@ -122,10 +122,10 @@ export default class Response extends React.Component {
|
||||
|
||||
|
||||
</td>
|
||||
{specSelectors.isOAS3() ? <td>
|
||||
{specSelectors.isOAS3() ? <td className="col response-col_links">
|
||||
{ links ?
|
||||
links.toSeq().map((link, key) => {
|
||||
return <OperationLink key={key} name={key} link={ link }/>
|
||||
return <OperationLink key={key} name={key} link={ link } getComponent={getComponent}/>
|
||||
})
|
||||
: <i>No links</i>}
|
||||
</td> : null}
|
||||
|
||||
@@ -68,7 +68,7 @@ export default class Responses extends React.Component {
|
||||
<tr className="responses-header">
|
||||
<td className="col col_header response-col_status">Code</td>
|
||||
<td className="col col_header response-col_description">Description</td>
|
||||
{ specSelectors.isOAS3() ? <td className="col col_header response-col_description">Links</td> : null }
|
||||
{ specSelectors.isOAS3() ? <td className="col col_header response-col_links">Links</td> : null }
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@@ -6,9 +6,9 @@ export default class Schemes extends React.Component {
|
||||
static propTypes = {
|
||||
specActions: PropTypes.object.isRequired,
|
||||
schemes: PropTypes.object.isRequired,
|
||||
currentScheme: PropTypes.string.isRequired,
|
||||
path: PropTypes.string,
|
||||
method: PropTypes.string,
|
||||
operationScheme: PropTypes.string
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
@@ -19,8 +19,8 @@ export default class Schemes extends React.Component {
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
if ( !this.props.operationScheme || !nextProps.schemes.has(this.props.operationScheme) ) {
|
||||
// if we don't have a selected operationScheme or if our selected scheme is no longer an option,
|
||||
if ( !this.props.currentScheme || !nextProps.schemes.includes(this.props.currentScheme) ) {
|
||||
// if we don't have a selected currentScheme or if our selected scheme is no longer an option,
|
||||
// then fire 'change' event and select the first scheme in the list of options
|
||||
this.setScheme(nextProps.schemes.first())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user