mirror of
https://github.com/trezor/trezor-wallet
synced 2024-12-28 01:48:10 +00:00
autoSelect props in Input component
This commit is contained in:
parent
556b2be84f
commit
d26d354fbd
@ -185,6 +185,7 @@ class Input extends PureComponent {
|
|||||||
value={this.props.value}
|
value={this.props.value}
|
||||||
readOnly={this.props.readOnly}
|
readOnly={this.props.readOnly}
|
||||||
onChange={this.props.onChange}
|
onChange={this.props.onChange}
|
||||||
|
onClick={this.props.autoSelect ? event => event.target.select() : null}
|
||||||
borderColor={this.getColor(this.props.state)}
|
borderColor={this.getColor(this.props.state)}
|
||||||
disabled={this.props.isDisabled}
|
disabled={this.props.isDisabled}
|
||||||
name={this.props.name}
|
name={this.props.name}
|
||||||
@ -220,6 +221,7 @@ Input.propTypes = {
|
|||||||
spellCheck: PropTypes.string,
|
spellCheck: PropTypes.string,
|
||||||
value: PropTypes.string,
|
value: PropTypes.string,
|
||||||
readOnly: PropTypes.bool,
|
readOnly: PropTypes.bool,
|
||||||
|
autoSelect: PropTypes.bool,
|
||||||
onChange: PropTypes.func,
|
onChange: PropTypes.func,
|
||||||
state: PropTypes.string,
|
state: PropTypes.string,
|
||||||
bottomText: PropTypes.string,
|
bottomText: PropTypes.string,
|
||||||
@ -233,6 +235,7 @@ Input.propTypes = {
|
|||||||
|
|
||||||
Input.defaultProps = {
|
Input.defaultProps = {
|
||||||
type: 'text',
|
type: 'text',
|
||||||
|
autoSelect: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Input;
|
export default Input;
|
||||||
|
@ -121,6 +121,7 @@ const AccountReceive = (props: Props) => {
|
|||||||
<Input
|
<Input
|
||||||
type="text"
|
type="text"
|
||||||
readOnly
|
readOnly
|
||||||
|
autoSelect
|
||||||
value={address}
|
value={address}
|
||||||
isPartiallyHidden={isAddressHidden}
|
isPartiallyHidden={isAddressHidden}
|
||||||
trezorAction={isAddressVerifying ? (
|
trezorAction={isAddressVerifying ? (
|
||||||
|
Loading…
Reference in New Issue
Block a user