mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-03-26 08:55:56 +01:00
FIX Caret was not visible in amount textinput
This commit is contained in:
parent
48eb401edf
commit
be6827e6f1
1 changed files with 8 additions and 1 deletions
|
@ -211,6 +211,13 @@ class AmountInput extends Component {
|
|||
});
|
||||
};
|
||||
|
||||
handleSelectionChange = event => {
|
||||
const { selection } = event.nativeEvent;
|
||||
if (selection.start !== selection.end || selection.start !== this.props.amount?.length) {
|
||||
this.textInput?.setNativeProps({ selection: { start: this.props.amount?.length, end: this.props.amount?.length } });
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { colors, disabled, unit } = this.props;
|
||||
const amount = this.props.amount || 0;
|
||||
|
@ -264,7 +271,7 @@ class AmountInput extends Component {
|
|||
{amount !== BitcoinUnit.MAX ? (
|
||||
<TextInput
|
||||
{...this.props}
|
||||
caretHidden
|
||||
onSelectionChange={this.handleSelectionChange}
|
||||
testID="BitcoinAmountInput"
|
||||
keyboardType="numeric"
|
||||
adjustsFontSizeToFit
|
||||
|
|
Loading…
Add table
Reference in a new issue