maxkordiyak / react-native-dropdown-autocomplete

Autocomplete input with dropdown modal component for React native. Useful for pages with multiple autocomplete's.
MIT License
100 stars 51 forks source link

Mixed used of ref callback and React.createRef #3

Closed Xyzor closed 5 years ago

Xyzor commented 5 years ago

I'm playing with the master branch and it looks like the this.dropdown parameter is always null.

Also it gets value 2 times, once in the constructor this.dropdown = React.createRef(); and once in the ref callback:

ref={ref => { this.dropdown = ref; }}

Is that intentional?

maxkordiyak commented 5 years ago

it looks like it is not intentional, I'll investigate this. in a meantime, if you have any suggestions please go ahead

Xyzor commented 5 years ago

The cause of null dropdown is probably my bad.
I just found out the provided content is an empty array.