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