peterp / react-native-tags

Tag input component for React Native
MIT License
288 stars 75 forks source link

tags not saving #33

Closed richardnassar-external closed 5 years ago

richardnassar-external commented 5 years ago

When i press done on the keyboard the tags are deleted ... and how can I write the tags under the text input without changing the size of the text input?

peterp commented 5 years ago

You need to save the tags somewhere else when the onChange function is called, I'm assuming your component reloads, for some reason, when you tap done.

When you redisplay the tag component you need to pass them back in...

<Tags 
    initialTags={mySavedTags}
    onChange={(tags) => functionThatSavesTheTags(tags)}
/>

As for you second question, it's not currently possible to move the text input above the tags.

richardnassar-external commented 5 years ago

I manipulated the styles and was able to display the input above the tags, and thank you for your quick reply.

peterp commented 5 years ago

Great! I'm going to close this because this doesn't seem to be an issue with react native tags, but rather a question.

Feel free to open another ticket if you need some help.