I'm trying to use the react-native-paper TextInput as a field to show a location search input. This doesn't seem to work because the ref property on this component doesn't get registered. How can I add a ref property to this field?
Asked
Active
Viewed 616 times
1
-
1Please add your non-working code and what you have tried – Abe Jul 29 '22 at 05:12
1 Answers
0
import * as React from 'react';
import { TextInput } from 'react-native-paper';
const [text, setText] = React.useState("");
const textRef=React.useRef(); //add this
<TextInput
ref={textRef} //add this
label="Email"
value={text}
onChangeText={text => setText(text)}
/>

Vhora Abdulrauf
- 104
- 5
-
I tried this, the problem is that this component is suitable for google maps location search because it isn't a htmlinputelement. – chackerian Jul 30 '22 at 23:34