mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-28 18:31:17 +01:00
Added ability to delete color value.
This commit is contained in:
parent
2ec6a90dc3
commit
ceeb628784
1 changed files with 5 additions and 1 deletions
|
@ -57,6 +57,10 @@ class ColorField extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
onChange (v) {
|
||||
this.props.onChange(v === "" ? undefined : v);
|
||||
}
|
||||
|
||||
render() {
|
||||
const offset = this.calcPickerOffset()
|
||||
var currentColor = this.color.object()
|
||||
|
@ -110,7 +114,7 @@ class ColorField extends React.Component {
|
|||
name={this.props.name}
|
||||
placeholder={this.props.default}
|
||||
value={this.props.value ? this.props.value : ""}
|
||||
onChange={(e) => this.props.onChange(e.target.value)}
|
||||
onChange={(e) => this.onChange(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue