From 4b8800e8ac6479c33d6d657824651de2b0a8fda1 Mon Sep 17 00:00:00 2001 From: orangemug Date: Sat, 22 Feb 2020 18:39:24 +0000 Subject: [PATCH 1/2] Added default to value to fix warning in console. --- src/components/inputs/CheckboxInput.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/inputs/CheckboxInput.jsx b/src/components/inputs/CheckboxInput.jsx index 94e8902..3715d0f 100644 --- a/src/components/inputs/CheckboxInput.jsx +++ b/src/components/inputs/CheckboxInput.jsx @@ -3,11 +3,15 @@ import PropTypes from 'prop-types' class CheckboxInput extends React.Component { static propTypes = { - value: PropTypes.bool.isRequired, + value: PropTypes.bool, style: PropTypes.object, onChange: PropTypes.func, } + static defaultProps = { + value: false, + } + render() { return