Open rhythm-sharma opened 2 years ago
Hey @rhythm-sharma I'm not 100% sure I'm following, do you think this is something that others may appreciate? Perhaps it's possible to do without modifying the RN-tags package?
Hi @peterp,
Yes, others will value this and it will be beneficial.
This gives the user better flexibility to use the library because they can controls the tags from the outside of the library.
What is my use case ? When a button is pressed, all I want to do is add tags to the input field, however the library does not currently support this.
do others may appreciate ? Yes, as it offers developers the freedom to manage the tags array from outside of the library component. There are many operation that can be done from the outside to mutate the tags array.
How to implement ?
To support this feature, We can create a props name tags
, and assign this value in the state
and using componentWillReceiveProps
check for the latest value of tags(prop). The implement would be more clear in the PR.
Let me know if you're convinced, and I'll quickly create PR.
Thanks
Currently, the library supports only
initialTags
prop, The initial tags are functioning properly on the component mounting.My usecase requires that, the tags should be shown to the input box both by
typing manually
and bysending them as props
.If you require more explanation of my usecase or anything else, let me know.
For this feature, I can also quickly create a pull request.
@peterp