Skip to content

Commit

Permalink
Update TextInput.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
aelassas committed Oct 15, 2023
1 parent 11de6dc commit 7c98089
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mobile/components/TextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,15 @@ function TextInputComponent(
{value !== '' && !props.hideLabel && <Text style={styles.label}>{props.label}</Text>}
<View style={styles.inputContainer}>
<ReactTextInput
ref={(r) => {
ref={(inputRef) => {
if (ref) {
if (typeof ref === 'function') {
ref(r)
ref(inputRef)
} else {
ref.current = r
ref.current = inputRef
}
}
_ref.current = r
_ref.current = inputRef
}}
secureTextEntry={props.secureTextEntry}
placeholder={props.label}
Expand Down

0 comments on commit 7c98089

Please sign in to comment.