Skip to content

Commit

Permalink
Merge pull request swagger-api#3195 from gwynjudd/model-expansion
Browse files Browse the repository at this point in the history
Add support for docExpansion flag to models
  • Loading branch information
webron committed Jun 7, 2017
2 parents 4038b11 + 4f7e75f commit e8d84c0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/core/components/models.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ export default class Models extends Component {
getComponent: PropTypes.func,
specSelectors: PropTypes.object,
layoutSelectors: PropTypes.object,
layoutActions: PropTypes.object
layoutActions: PropTypes.object,
getConfigs: PropTypes.func.isRequired
}

render(){
let { specSelectors, getComponent, layoutSelectors, layoutActions } = this.props
let { specSelectors, getComponent, layoutSelectors, layoutActions, getConfigs } = this.props
let definitions = specSelectors.definitions()
let showModels = layoutSelectors.isShown("models", true)
let { docExpansion } = getConfigs()
let showModels = layoutSelectors.isShown("models", docExpansion === "full" || docExpansion === "list" )

const Model = getComponent("model")
const Collapse = getComponent("Collapse")
Expand Down

0 comments on commit e8d84c0

Please sign in to comment.