warnings/proptypes: use oneOfType to support object and string
This commit is contained in:
parent
fdf1826388
commit
e23f7e69dd
@ -8,7 +8,10 @@ class ControlHOC extends Component {
|
||||
static propTypes = {
|
||||
controlComponent: PropTypes.func.isRequired,
|
||||
field: ImmutablePropTypes.map.isRequired,
|
||||
value: PropTypes.node,
|
||||
value: PropTypes.oneOfType([
|
||||
PropTypes.object,
|
||||
PropTypes.string,
|
||||
]),
|
||||
metadata: ImmutablePropTypes.map,
|
||||
onChange: PropTypes.func.isRequired,
|
||||
onValidate: PropTypes.func.isRequired,
|
||||
|
@ -19,5 +19,8 @@ export default class DateTimeControl extends React.Component {
|
||||
|
||||
DateTimeControl.propTypes = {
|
||||
onChange: PropTypes.func.isRequired,
|
||||
value: PropTypes.object, // eslint-disable-line
|
||||
value: PropTypes.oneOfType([
|
||||
PropTypes.object,
|
||||
PropTypes.string,
|
||||
]),
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user