fixed text input autofocus when redirect to delegation screen

This commit is contained in:
Sadaqat Ali 2022-02-21 16:49:48 +05:00
parent 83c4ccf0ef
commit c41afeefa8

View File

@ -75,7 +75,10 @@ class DelegateScreen extends Component {
if (referredUsername) {
this.setState({ destination: referredUsername, usersResult: [], step: 2 }, () => {
this._fetchReceivedVestingShare();
this.destinationTextInput.current?.blur();
});
} else {
this.destinationTextInput.current?.focus();
}
}
componentDidUpdate(prevProps, prevState) {
@ -344,7 +347,6 @@ class DelegateScreen extends Component {
multiline={isTextArea}
numberOfLines={isTextArea ? 4 : 1}
keyboardType={keyboardType}
autoFocus={true}
innerRef={this.destinationTextInput}
/>