Skip to content

Commit

Permalink
Merge pull request #3941 from shockey/bug/3932-schema-not-values
Browse files Browse the repository at this point in the history
Don't treat `not` as an array (in contrast to `allOf`, `anyOf`, `oneOf`)
  • Loading branch information
shockey committed Nov 21, 2017
2 parents cfc7b1a + 9f18e02 commit 01d84cd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/core/components/model.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import React, { PureComponent } from "react"
import ImPropTypes from "react-immutable-proptypes"
import PropTypes from "prop-types"

export default class Model extends PureComponent {
static propTypes = {
schema: PropTypes.object.isRequired,
schema: ImPropTypes.orderedMap.isRequired,
getComponent: PropTypes.func.isRequired,
specSelectors: PropTypes.object.isRequired,
name: PropTypes.string,
Expand Down
13 changes: 7 additions & 6 deletions src/core/components/object-model.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,13 @@ export default class ObjectModel extends Component {
: <tr>
<td>{ "not ->" }</td>
<td>
{not.map((schema, k) => {
return <div key={k}><Model { ...otherProps } required={ false }
getComponent={ getComponent }
schema={ schema }
depth={ depth + 1 } /></div>
})}
<div>
<Model { ...otherProps }
required={ false }
getComponent={ getComponent }
schema={ not }
depth={ depth + 1 } />
</div>
</td>
</tr>
}
Expand Down

0 comments on commit 01d84cd

Please sign in to comment.