warnings/widgets: forID is not required + typo
This commit is contained in:
parent
e23f7e69dd
commit
38cb065570
@ -4,10 +4,10 @@ import Switch from 'react-toolbox/lib/switch';
|
||||
|
||||
export default class BooleanControl extends React.Component {
|
||||
render() {
|
||||
const { value, field, forId, onChange } = this.props;
|
||||
const { value, field, forID, onChange } = this.props;
|
||||
return (
|
||||
<Switch
|
||||
id={forId}
|
||||
id={forID}
|
||||
checked={value === undefined ? field.get('defaultValue', false) : value}
|
||||
onChange={onChange}
|
||||
/>
|
||||
@ -18,6 +18,6 @@ export default class BooleanControl extends React.Component {
|
||||
BooleanControl.propTypes = {
|
||||
field: ImmutablePropTypes.map.isRequired,
|
||||
onChange: PropTypes.func.isRequired,
|
||||
forID: PropTypes.string.isRequired,
|
||||
forID: PropTypes.string,
|
||||
value: PropTypes.bool,
|
||||
};
|
||||
|
@ -30,7 +30,7 @@ export default class ListControl extends Component {
|
||||
onChange: PropTypes.func.isRequired,
|
||||
value: PropTypes.node,
|
||||
field: PropTypes.node,
|
||||
forID: PropTypes.string.isRequired,
|
||||
forID: PropTypes.string,
|
||||
getAsset: PropTypes.func.isRequired,
|
||||
onAddAsset: PropTypes.func.isRequired,
|
||||
onRemoveAsset: PropTypes.func.isRequired,
|
||||
|
@ -13,5 +13,5 @@ export default class StringControl extends React.Component {
|
||||
StringControl.propTypes = {
|
||||
onChange: PropTypes.func.isRequired,
|
||||
value: PropTypes.node,
|
||||
forID: PropTypes.string.isRequired,
|
||||
forID: PropTypes.string,
|
||||
};
|
||||
|
@ -12,7 +12,7 @@ export default class ObjectControl extends Component {
|
||||
getAsset: PropTypes.func.isRequired,
|
||||
value: PropTypes.node,
|
||||
field: PropTypes.object,
|
||||
forID: PropTypes.string.isRequired,
|
||||
forID: PropTypes.string,
|
||||
className: PropTypes.string,
|
||||
};
|
||||
|
||||
|
@ -12,6 +12,6 @@ export default class StringControl extends React.Component {
|
||||
|
||||
StringControl.propTypes = {
|
||||
onChange: PropTypes.func.isRequired,
|
||||
forID: PropTypes.string.isRequired,
|
||||
forID: PropTypes.string,
|
||||
value: PropTypes.node,
|
||||
};
|
||||
|
@ -27,6 +27,6 @@ export default class StringControl extends React.Component {
|
||||
|
||||
StringControl.propTypes = {
|
||||
onChange: PropTypes.func.isRequired,
|
||||
forID: PropTypes.string.isRequired,
|
||||
forID: PropTypes.string,
|
||||
value: PropTypes.node,
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user