🐛 répare le problème du clavier qui revient toujours sur chrome iOS

pull/245/merge
Johan Girod 2018-05-29 11:53:21 +02:00
parent 7b7e4c7480
commit 39654f4559
1 changed files with 7 additions and 0 deletions

View File

@ -30,6 +30,12 @@ class CurrencyInput extends Component {
value: nextProps.value
}
}
shouldComponentUpdate(nextProps, nextState) {
return (
this.state.value !== nextState.value ||
this.props.language !== nextProps.language
)
}
getSnapshotBeforeUpdate = () => {
return this.input.selectionStart
}
@ -69,6 +75,7 @@ class CurrencyInput extends Component {
this.props.onChange(event)
}
}
render() {
let forwardedProps = dissoc(
['onChange', 'value', 'language', 'className'],