Don't treat not as an array (in contrast to allOf, anyOf)

This commit is contained in:
Kyle Shockey
2017-11-21 14:08:55 -08:00
parent 2ad1bacf6f
commit 44d9234971
2 changed files with 9 additions and 7 deletions

View File

@@ -1,9 +1,10 @@
import React, { PureComponent } from "react" import React, { PureComponent } from "react"
import ImPropTypes from "react-immutable-proptypes"
import PropTypes from "prop-types" import PropTypes from "prop-types"
export default class Model extends PureComponent { export default class Model extends PureComponent {
static propTypes = { static propTypes = {
schema: PropTypes.object.isRequired, schema: ImPropTypes.orderedMap.isRequired,
getComponent: PropTypes.func.isRequired, getComponent: PropTypes.func.isRequired,
specSelectors: PropTypes.object.isRequired, specSelectors: PropTypes.object.isRequired,
name: PropTypes.string, name: PropTypes.string,

View File

@@ -142,12 +142,13 @@ export default class ObjectModel extends Component {
: <tr> : <tr>
<td>{ "not ->" }</td> <td>{ "not ->" }</td>
<td> <td>
{not.map((schema, k) => { <div>
return <div key={k}><Model { ...otherProps } required={ false } <Model { ...otherProps }
getComponent={ getComponent } required={ false }
schema={ schema } getComponent={ getComponent }
depth={ depth + 1 } /></div> schema={ not }
})} depth={ depth + 1 } />
</div>
</td> </td>
</tr> </tr>
} }