react-native-form-generator
react-native-form-generator copied to clipboard
iconRight self.refs returns empty object
I am trying to get validation working, but self.refs is returning an empty object {}. Any idea why?
<InputField
ref='example_input_field'
placeholder='Full Name'
containerStyle={globalStyles.formContentContainer}
validationFunction = {(value)=>{return true;}}
iconRight={
<Icon name='ios-checkmark'
size={30}
style={[
{marginTop:7, color:"#61d062" },
((self)=>{
console.log('refs:', self.refs)
//i can change the style of the component related to the attibute of example_input_field
if(!!(self.refs && self.refs.example_input_field)){
if(!self.refs.example_input_field.valid) return {color:'#d52222'}
}
}
)(this)]}
/>
}/>
+1
same issue here
Has anyone been able to resolve this?