From 7c7c8b7111aa7f9c6bf3446d915af72824504b2b Mon Sep 17 00:00:00 2001 From: lukasmartinelli Date: Mon, 12 Sep 2016 20:10:49 +0200 Subject: [PATCH] Reactivate on change for background layer --- src/fields/color.jsx | 2 ++ src/fields/enum.jsx | 8 +++++++- src/fields/number.jsx | 2 ++ src/fields/spec.jsx | 11 +++++++++++ src/fields/string.jsx | 2 ++ src/layers/background.jsx | 16 ++++++++++++---- src/layers/fill.jsx | 13 +++++++++++-- 7 files changed, 47 insertions(+), 7 deletions(-) diff --git a/src/fields/color.jsx b/src/fields/color.jsx index 6ca92af..4c1895c 100644 --- a/src/fields/color.jsx +++ b/src/fields/color.jsx @@ -4,6 +4,7 @@ import { Select, Input } from 'rebass' /*** Number fields with support for min, max and units and documentation*/ class ColorField extends React.Component { static propTypes = { + onChange: React.PropTypes.func.isRequired, name: React.PropTypes.string.isRequired, value: React.PropTypes.number, default: React.PropTypes.number, @@ -12,6 +13,7 @@ static propTypes = { render() { return { return {children: val, value: val} }) - return } } diff --git a/src/fields/number.jsx b/src/fields/number.jsx index da32a25..4b764a7 100644 --- a/src/fields/number.jsx +++ b/src/fields/number.jsx @@ -4,6 +4,7 @@ import { Select, Input } from 'rebass' /*** Number fields with support for min, max and units and documentation*/ class NumberField extends React.Component { static propTypes = { + onChange: React.PropTypes.func.isRequired, name: React.PropTypes.string.isRequired, value: React.PropTypes.number, default: React.PropTypes.number, @@ -15,6 +16,7 @@ class NumberField extends React.Component { render() { return - - + + } } diff --git a/src/layers/fill.jsx b/src/layers/fill.jsx index cb75453..0e57af7 100644 --- a/src/layers/fill.jsx +++ b/src/layers/fill.jsx @@ -26,8 +26,17 @@ export default class FillLayer extends React.Component { render() { return
- - + +
} }