Closed thedewpoint closed 2 years ago
try to use focus instead of onFocus working fine for me
Could you please provide some reproducible code?
<MaterialTextfield
fieldName={'phoneNo'}
value={value.phoneNo}
ref={(ref: any) => (inputRefs.current[1] = ref)}
onSubmitEditing={() => inputRefs?.current[2].focus()}
keyboardType={'number-pad'}
error={error.phoneNo}
label={i18n.t('mobile')}
renderLeft={() =>
Im seeing a lot of fundamental mistakes in your code. I tested locally and onFocus
works fine. Closing.
I'm having the same problem with the onFocus event. Is there incompatibility with react-hook-form controller?
@sbjesushenao I'm unfamiliar with that library. However, if that library works with vanilla TextInput
from react-native, it should work. Could you please provide a snippet?
Hello, thanks for the reply, but I ended up using another library for my outlineInput. I tried your library without any Controller and still wasn't getting any response on the onFocus event. Maybe it is my react-native and reanimate version.
Hello, thanks for the reply, but I ended up using another library for my outlineInput. I tried your library without any Controller and still wasn't getting any response on the onFocus event. Maybe it is my react-native and reanimate version.
i have the same issue. @swushi
"react": "18.1.0",
"react-native": "0.70.6",
"react-native-input-outline": "^1.5.2",
"react-native-reanimated": "^2.13.0",
import { InputOutline } from 'react-native-input-outline';
const inputRef = useRef<InputOutline>(null);
<InputOutline
ref={inputRef}
placeholder={t`Enter password`}
onFocus={() => console.log("mmmmmmmmmmmmmm")}
onBlur={() => console.log("kkkkkkkkkkkkkkkk")}
/>
on focus never fires any events for me. I replaced InputOutline with a regular TextInput and it works fine so I think it's something wrong with this component