Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom dropdown list template #15

Open
chaosLegacy opened this issue Sep 9, 2018 · 1 comment
Open

Custom dropdown list template #15

chaosLegacy opened this issue Sep 9, 2018 · 1 comment

Comments

@chaosLegacy
Copy link

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
Copy link

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}
...
/>
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants