AutoCompleteTextView in react native compatible with both iOS and Android

后端 未结 2 1717
心在旅途
心在旅途 2021-01-18 04:52

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 feat

相关标签:
2条回答
  • 2021-01-18 05:04

    Here is the android native AutoCompleteTextView component - https://github.com/rajsuvariya/autocompletetextview - its a work in progress.

    0 讨论(0)
  • 2021-01-18 05:25

    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.

    0 讨论(0)
提交回复
热议问题