jwohlfert23 / react-native-tag-input

A simple React Native component that creates an input for tags, emails, etc.
MIT License
231 stars 104 forks source link

Allow label elements #63

Closed nol13 closed 6 years ago

nol13 commented 6 years ago

Allow labelExtractor to return an element instead of a string, to allow for showing custom icons or conditional styling and such. (my first time updating flow types but think those are right)

nol13 commented 6 years ago

I did run flow. Am using passing a component as a way to do conditional styling at the moment. We want some invalid tags to still get made into tags, but have their text show up red, while valid tags would still be gray.

Actually in real app am currently returning Text component from labelExtractor anyway, and ignoring the PropType warnings, but figured this makes it a little more flexible.

Ashoat commented 6 years ago

Published in react-native-tag-input@0.0.21. Thanks again!