Don't treat not as an array (in contrast to allOf, anyOf)
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
@@ -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>
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user