mirror of
https://github.com/maputnik/editor.git
synced 2026-11-30 22:04:20 +00:00
Only set dirtyValue on valid change.
This commit is contained in:
1 parent
926969b921
commit
0726a494be
1 file changed
+4
-1
@@ -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