From b1e62314688b4f2d20a22b3fab8b09b16a89a768 Mon Sep 17 00:00:00 2001 From: Juan Cortes Ross <juan@bohem.io> Date: Sat, 25 Aug 2018 15:55:30 +0200 Subject: [PATCH] Preparsed value for RecipientAddress to remove spaces --- src/components/RecipientAddress/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/RecipientAddress/index.js b/src/components/RecipientAddress/index.js index 24f7895d..b579ebef 100644 --- a/src/components/RecipientAddress/index.js +++ b/src/components/RecipientAddress/index.js @@ -99,9 +99,10 @@ class RecipientAddress extends PureComponent<Props, State> { </Right> ) : null + const preOnChange = text => onChange((text && text.replace(/\s/g, '')) || '') return ( <Box relative justifyContent="center"> - <Input {...rest} value={value} onChange={onChange} renderRight={renderRight} /> + <Input {...rest} value={value} onChange={preOnChange} renderRight={renderRight} /> </Box> ) }