mirror of
https://github.com/maputnik/editor.git
synced 2025-12-25 07:30:00 +00:00
Only set dirtyValue on valid change.
This commit is contained in:
@@ -48,10 +48,13 @@ class NumberInput extends React.Component {
|
||||
const hasChanged = this.props.value !== value;
|
||||
if(this.isValid(value) && hasChanged) {
|
||||
this.props.onChange(value)
|
||||
this.setState({
|
||||
dirtyValue: newValue,
|
||||
});
|
||||
}
|
||||
|
||||
this.setState({
|
||||
value: newValue,
|
||||
dirtyValue: newValue,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user