diff --git a/src/components/Widgets/BooleanControl.js b/src/components/Widgets/BooleanControl.js index 8c86e6441ca3..c006253ec1f0 100644 --- a/src/components/Widgets/BooleanControl.js +++ b/src/components/Widgets/BooleanControl.js @@ -3,19 +3,15 @@ import ImmutablePropTypes from "react-immutable-proptypes"; import Switch from 'react-toolbox/lib/switch'; export default class BooleanControl extends React.Component { - - handleChange = (e) => { - this.props.onChange(e); - }; - render() { - const finalValue = (this.props.value !== undefined) ? this.props.value : this.props.field.get('defaultValue', false); - - return (); + const { value, field, forId, onChange } = this.props; + return ( + + ); } }