зеркало из https://github.com/mozilla/Spoke.git
Merge pull request #1190 from mozilla/handle-update-on-blur
Do not call onChange when focus changes in NumericInput
This commit is contained in:
Коммит
3fc3379cb7
|
@ -166,14 +166,12 @@ export default class NumericInput extends Component {
|
|||
};
|
||||
|
||||
handleBlur = () => {
|
||||
const { value, onCommit, onChange } = this.props;
|
||||
const { value, onCommit } = this.props;
|
||||
|
||||
this.setState({ tempValue: null, focused: false });
|
||||
|
||||
if (onCommit) {
|
||||
onCommit(value);
|
||||
} else {
|
||||
onChange(value);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче