JoeRoddy / react-native-tag-autocomplete

React Native Tag Autocompletion
69 stars 26 forks source link

Custom dropdown list template #15

Open chaosLegacy opened 6 years ago

chaosLegacy commented 6 years ago

Hi, thank you for the great work, I'm looking for a way to implement this library but with a custom template for the dropdown list, example: displaying an icon flag on the right side is there a way we can add our own template?

thank you so much.

meliodev commented 4 years ago

Just override the prop renderSuggestion. Example:

` customRenderSuggestion = suggestion => { const name = suggestion.fullName

    return (
        <View style={styles.customSuggestion}>
            <Text>{name}</Text>
            <Avatar.Image size={35} source={{ uri: uri }} />
        </View>
    )
}

<AutoTags renderSuggestion={this.customRenderSuggestion} ... /> `