rafaelmotta / react-native-tag-select

🏷 A simple tag component to act as radio button / checkbox
156 stars 43 forks source link

How to show already selected #16

Open karanpratapsingh opened 5 years ago

karanpratapsingh commented 5 years ago

Hey, awesome package...but I was wondering is there a way to show a tag which is already selected? Right now when it is rendered it shows all tags as not selected

Thanks

shivamtiwari8736 commented 4 years ago

Hi @karanpratapsingh Have you go any solution to this problem, I am going through the same.

Thanks

karanpratapsingh commented 4 years ago

@shivamtiwari8736 unfortunately not :(

shivamtiwari8736 commented 4 years ago

@karanpratapsingh then what you did to achieve it?

karanpratapsingh commented 4 years ago

you can try this one https://callstack.github.io/react-native-paper/chip.html, works well

shivamtiwari8736 commented 4 years ago

Thanks @karanpratapsingh , I'll try this.

karanpratapsingh commented 4 years ago

My pleasure, bro 😄

ThiagoBr91 commented 4 years ago

You can use the value prop, which is an array with the keys of the selected tags @karanpratapsingh @shivamtiwari8736

ankitjaiswal1994 commented 3 years ago

I think it is clearly mentioned in the document. Use value prop

value | array | [] | Array with pre-defined values

Also tested it working fine.