Posts

Showing posts with the label focus

React Native (React Native Elements) SearchBar Missing Functions focus() blur()

* NOTE [RESOLVED] * React-Native-Elements issue : SearchBar missing functions #877 soln : updated react-native-elements package from 1.0.0.0-beta2 -> 1.0.0.0-beta4 Based on the DOCS, My goal is to be able to call focus() on the 'Search Bar' component <SearchBar ref={search => this.search = search} onClearText={()=>this.handleOnClearText()} /> However, when I capture the onClearText( ) action I am unable to call : handleOnClearText = () => { if(this.search != null) this.search.focus() . //=====> Error here } I get error : ExceptionsManager.js:65 TypeError: _this.search.focus is not a function I am able to reference my SearchBar component but the focus() methods is missing. COMPLETE CODE: import React, { Component } from "react"; import {Text,View,StyleSheet,Platform,Keyboard,TextInput} from "react-native"; import {SearchBar} from "react-native-elements"; export default clas...