byteburgers / react-native-autocomplete-input

Pure javascript autocomplete input for react-native
https://byteburgers.com/autocomplete
MIT License
818 stars 255 forks source link

[Request] Possibility to render custom component for input field? #251

Closed alessandrocapra closed 1 year ago

alessandrocapra commented 1 year ago

Thanks for the hard work that went on this package!

I saw that an optional renderTextInput prop is available, to display a TextInput with custom props. Is it somehow possible to render a custom component instead?

My need arises from using NativeBase as UI framework, so rendering a <Input /> component fdrom native base would keep my input fields visually consistent.

Is it already somehow possible?

Thanks

ajenkins commented 1 year ago

You can pass any component you want to renderTextInput. If you look at the tests you can see that you can pass a different component, like Text. If you can think of a way to make this clearer in the documentation, please make a PR for the README. Thanks!