aboutsummaryrefslogtreecommitdiff
path: root/src/settings/components/form/PropertiesForm.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings/components/form/PropertiesForm.jsx')
-rw-r--r--src/settings/components/form/PropertiesForm.jsx12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/settings/components/form/PropertiesForm.jsx b/src/settings/components/form/PropertiesForm.jsx
index 9143a7a..0014899 100644
--- a/src/settings/components/form/PropertiesForm.jsx
+++ b/src/settings/components/form/PropertiesForm.jsx
@@ -7,9 +7,6 @@ class PropertiesForm extends React.Component {
render() {
let types = this.props.types;
let value = this.props.value;
- if (!value) {
- value = {};
- }
return <div className='form-properties-form'>
{
@@ -40,10 +37,6 @@ class PropertiesForm extends React.Component {
}
bindValue(e) {
- if (!this.props.onChange) {
- return;
- }
-
let name = e.target.name;
let next = { ...this.props.value };
if (e.target.type.toLowerCase() === 'checkbox') {
@@ -63,4 +56,9 @@ PropertiesForm.propTypes = {
onChange: PropTypes.func,
};
+PropertiesForm.defaultProps = {
+ value: {},
+ onChange: () => {},
+};
+
export default PropertiesForm;