diff --git a/components/TextInput.tsx b/components/TextInput.tsx index ef9a2acb6..1d02e648b 100644 --- a/components/TextInput.tsx +++ b/components/TextInput.tsx @@ -36,6 +36,7 @@ interface TextInputProps { ref?: React.Ref; error?: boolean; onFocus?: any; + onSubmitEditing?: () => void; } const TextInput = React.forwardRef( @@ -167,6 +168,7 @@ const TextInput = React.forwardRef( autoFocus={autoFocus} secureTextEntry={secureTextEntry} onPressIn={onPressIn} + onSubmitEditing={props.onSubmitEditing} ref={ref} /> {suffix ? ( diff --git a/views/Lockscreen.tsx b/views/Lockscreen.tsx index 0b178c2d6..48d64d05b 100644 --- a/views/Lockscreen.tsx +++ b/views/Lockscreen.tsx @@ -463,6 +463,7 @@ export default class Lockscreen extends React.Component< ...styles.textInput, paddingTop: passphraseAttempt === '' ? 6 : 2 }} + onSubmitEditing={() => this.onAttemptLogIn()} />