I need to implement AutoCompleteTextView in react native. The problem is that there is no such built-in component. All the modules and libraries available to mimic this feature is not completely similar. The main issue is the suggestions are not appearing over the view(like that of select box/picker). Even if it is then it is not behaving perfectly withKeyboardAvoidingView. The whole point is it is not working like native AutoCompleteTextView for Android
The other solution is using native UI element. But I want this component for both iOS and Android. Any help would be appreciated.
I want to achieve this option like tag user on the Facebook app
P.S.: Excuse the typos as I am using a mobile device.
React Native combines the best parts of native development with React, a best-in-class JavaScript library for building user interfaces. Use a little—or a lot. You can use React Native today in your existing Android and iOS projects or you can create a whole new app from scratch.
With React Native, one team can maintain two platforms and share a common technology — React. As you can use the same source code to run on iOS and Android devices, you don't have to hire separate developers to write code for Android and iOS devices.
React Native supports building apps for iOS, Android, and web from a single code base. It's a more affordable technology than Swift, yet it allows creating high-quality apps.
Overview. React Native is an open-source mobile application framework created by Facebook. It is used to develop applications for Android, iOS, Web and UWP (Windows) providing native UI controls and full access to the native platform. Working with React Native requires an understanding of JavaScript fundamentals.
After searching a lot for available Libraries and module, I came up with my own implementation of custom AutoCompleteTextView.
I have created a gist for AutoCompleteTextView.
The idea behind:
*There is one input field on the focus of this field keyboard appears.
*When keyboard appears we calculate space from top to input field and from input field till the start of keypad area.
*Will display an absolute positioned scroll view Suggestion area on top or bottom of input field based on the space calculation above.
*When keyboard goes away we hide the suggestion area.
Suggestions are welcome on how to improve this thing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With