byteburgers / react-native-autocomplete-input

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

result-now-showing-in-suggestions-example #190

Closed bilalyaqoob closed 3 years ago

bilalyaqoob commented 3 years ago

The suggestion list result was not visible in examples.

mrondin1 commented 3 years ago

Same, I had to update renderItem in the iOS example. Following the iOS example in the README:

renderItem={({ title }) => (
            <TouchableOpacity onPress={() => this.setState({ query: title })}>
              <Text style={styles.itemText}>
                {title}
              </Text>
            </TouchableOpacity>
          )}
renderItem={({ item, i }) => (
            <TouchableOpacity onPress={() => this.setState({ query: item.title })}>
              <Text style={styles.itemText}>
                {item.title}
              </Text>
            </TouchableOpacity>
          )}

191