title: How do i call a function outside of Field render method in React-native?
body: <p>Hi Experts i'm a newbie in react-native, help will appreciated.</p>
  
  <p>I need to call a method name openModel() which is globally declared in Component and i have a method renderInput which renders each Input passed in Field tag. When openModel() is call inside renderInput of its Inputs on Focus. Error shows _this4.openModel is not a function. Its clearly understood that this is getting incremented because of multiple time renderInput method is called.
  How do i fix this ?
  <strong>Below is short code</strong></p>
  
  <pre><code>class AddPatientForm extends Component {
    constructor(props) {
      super(props);
      openModel = () =&gt; {
  
       this.refs.bGroup.open();
  
      }
  
      renderInput({ input, label, type, meta: { touched, error, warning } }) {
  
          return (
            &lt;View style={{ flexDirection: "row", height: 25, paddingRight: 5, }}&gt;
              &lt;Input
                ref={c =&gt; { this.textInput = c }}
                returnKeyType={input.name === "Password" ? "" : "next"}
                onSubmitEditing={() =&gt; { this.textInput._root.focus(); }}
                blurOnSubmit={false}
                secureTextEntry={input.name === "Password"}
                {...input}
                onFocus={() =&gt; this.openModel()}
                keyboardType={input.name === "mobile" || input.name === "age" ? "numeric" : "default"}
                autoCapitalize="none"
              /&gt;
            &lt;/View&gt;
          );
        }
  
       &lt;Field name="patientId" component={this.renderInput} type="" validate={[alphaNumeric,required]} /&gt;
  }
  </code></pre>