From 9c6eb503430dd6de581efe18b115ac645f34d7ab Mon Sep 17 00:00:00 2001 From: lukasmartinelli Date: Thu, 15 Sep 2016 18:51:49 +0200 Subject: [PATCH] Set prop value for empty string --- src/fields/string.jsx | 2 +- src/map.jsx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fields/string.jsx b/src/fields/string.jsx index 09ccea4..6e5e05d 100644 --- a/src/fields/string.jsx +++ b/src/fields/string.jsx @@ -22,7 +22,7 @@ render() { style={inputStyle.input} name={this.props.name} placeholder={this.props.default} - value={this.props.value} + value={this.props.value ? this.props.value : ""} onChange={this.onChange.bind(this)} /> diff --git a/src/map.jsx b/src/map.jsx index 1f2197e..d42c32b 100644 --- a/src/map.jsx +++ b/src/map.jsx @@ -26,6 +26,7 @@ export class Map extends React.Component { // TODO: If there is no map yet we need to apply the changes later? if(this.state.map) { style.diffStyles(this.props.mapStyle, nextProps.mapStyle).forEach(change => { + console.log(change.command, ...change.args) this.state.map[change.command].apply(this.state.map, change.args); }); }