mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-27 09:35:25 +01:00
Set prop value for empty string
This commit is contained in:
parent
5f029f6870
commit
9c6eb50343
2 changed files with 2 additions and 1 deletions
|
@ -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)}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue