From 39654f4559f3a2228e71e52269d19eb73baaa84f Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Tue, 29 May 2018 11:53:21 +0200 Subject: [PATCH] =?UTF-8?q?:bug:=20r=C3=A9pare=20le=20probl=C3=A8me=20du?= =?UTF-8?q?=20clavier=20qui=20revient=20toujours=20sur=20chrome=20iOS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/components/CurrencyInput/CurrencyInput.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/components/CurrencyInput/CurrencyInput.js b/source/components/CurrencyInput/CurrencyInput.js index 2aea4c7c2..0ec7baaf9 100644 --- a/source/components/CurrencyInput/CurrencyInput.js +++ b/source/components/CurrencyInput/CurrencyInput.js @@ -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'],