mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2025-01-30 16:25:31 +01:00
Add even more logging.
This commit is contained in:
parent
88841b56e7
commit
a560176d83
1 changed files with 3 additions and 2 deletions
|
@ -31,14 +31,14 @@ class NumberInput extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
static getDerivedStateFromProps(props, state) {
|
static getDerivedStateFromProps(props, state) {
|
||||||
|
console.log("getDerivedStateFromProps[%s]", state.uuid, props.value, state.value);
|
||||||
if (!state.editing) {
|
if (!state.editing) {
|
||||||
console.log("getDerivedStateFromProps[%s]", state.uuid, props.value);
|
|
||||||
return {
|
return {
|
||||||
value: props.value,
|
value: props.value,
|
||||||
dirtyValue: props.value,
|
dirtyValue: props.value,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return {};
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
changeValue(newValue) {
|
changeValue(newValue) {
|
||||||
|
@ -166,6 +166,7 @@ class NumberInput extends React.Component {
|
||||||
placeholder={this.props.default}
|
placeholder={this.props.default}
|
||||||
value={this.state.dirtyValue === undefined ? "" : this.state.dirtyValue}
|
value={this.state.dirtyValue === undefined ? "" : this.state.dirtyValue}
|
||||||
onChange={e => {
|
onChange={e => {
|
||||||
|
console.log("input.text->onChange[%s]", this.state.uuid, e.target.value);
|
||||||
this.changeValue(e.target.value)
|
this.changeValue(e.target.value)
|
||||||
}}
|
}}
|
||||||
onBlur={this.resetValue}
|
onBlur={this.resetValue}
|
||||||
|
|
Loading…
Reference in a new issue