From 9386ccd30c510df92e405e99a2e8d5eac3cc661e Mon Sep 17 00:00:00 2001 From: Vladimir Volek Date: Thu, 22 Nov 2018 16:25:20 +0100 Subject: [PATCH] Revert "Turn off autocomplete" This reverts commit 8127a1a105f973d49286573727e16e16634ecdae. --- src/components/inputs/Input/index.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/components/inputs/Input/index.js b/src/components/inputs/Input/index.js index 0a1bd3c0..cf296bf2 100644 --- a/src/components/inputs/Input/index.js +++ b/src/components/inputs/Input/index.js @@ -154,8 +154,12 @@ class Input extends PureComponent { render() { return ( - - {this.props.topLabel && {this.props.topLabel}} + + {this.props.topLabel && ( + {this.props.topLabel} + )} {this.props.state && ( @@ -167,9 +171,11 @@ class Input extends PureComponent { {this.props.icon} 0} innerRef={this.props.innerRef} hasAddon={!!this.props.sideAddons} + type={this.props.type} color={this.getColor(this.props.state)} placeholder={this.props.placeholder} autocomplete={this.props.autocomplete} @@ -177,13 +183,13 @@ class Input extends PureComponent { autocapitalize={this.props.autocapitalize} spellCheck={this.props.spellCheck} value={this.props.value} + readOnly={this.props.readOnly} onChange={this.props.onChange} onClick={this.props.autoSelect ? event => event.target.select() : null} borderColor={this.getColor(this.props.state)} disabled={this.props.isDisabled} name={this.props.name} data-lpignore="true" - {...this.props} /> {this.props.trezorAction} @@ -192,7 +198,9 @@ class Input extends PureComponent { {this.props.sideAddons && this.props.sideAddons.map(sideAddon => sideAddon)} {this.props.bottomText && ( - + {this.props.bottomText} )} @@ -227,7 +235,6 @@ Input.propTypes = { Input.defaultProps = { type: 'text', - autocomplete: false, autoSelect: false, };