react-native-searchbar icon indicating copy to clipboard operation
react-native-searchbar copied to clipboard

The searcbar does not autofocus on text input on Android device

Open SujaYuga opened this issue 7 years ago • 4 comments

The searcbar does not autofocus on text input on Android device. The auto focus does not work even when setting true for focusOnLayout. IOS device shows focus on text box even without focusOnLayout prop

<SearchBar ref={(search) => this.search = search} //data={items} //handleResults={this._handleResults} focusOnLayout= {true} handleChangeText={(input) => this._handleSearchResults(input)} onBack={() => this._handleSearchBack()} //hideBack={true} //showOnLoad onBlur={() => this._handleSearchBar()} onSubmitEditing={() => this._handleSearchSubmit()} />

SujaYuga avatar Feb 24 '18 21:02 SujaYuga

any update on this issue?

SujaYuga avatar Mar 02 '18 00:03 SujaYuga

Hi, i forked the library and added the prop of autoFocus for myself. You can do that if you want.

ZeerakHameem avatar Apr 09 '18 06:04 ZeerakHameem

Hi, Thanks for replying back. But I wanted to deploy the app and wanted that feature. Please if you can merge that part. Will be very thankful to you.

On Mon, Apr 9, 2018 at 11:45 AM, ZeerakHameem [email protected] wrote:

Hi, i forked the library and added the prop of autoFocus for myself. You can do that if you want.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/localz/react-native-searchbar/issues/54#issuecomment-379644848, or mute the thread https://github.com/notifications/unsubscribe-auth/AiW7_VCPKeutmnPwFXnaDgMuztg9Eq7wks5tmvxvgaJpZM4SSD0N .

karanhashedin avatar Apr 10 '18 11:04 karanhashedin

I've tested focusOnLayout with React Native 0.55.4 and Android API 27. It's working as expected. In which versions are you seeing this?

daveols avatar Jun 04 '18 13:06 daveols