You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am rendering a dynamic form and creating the radio buttons, I am able to get the functionality of radio buttons but the radio button labels are not showing.
Below is my code snippet which I am creating inside a FlatList for dynamic radio buttons creation, but radio labels are not coming.
I have tried with solutions with creating the radio buttons with .map as well but it did not worked. Please provide some solution for my issue. Thanks in advance.
The text was updated successfully, but these errors were encountered:
amit13091992
changed the title
how to add dyamic radio button labels.
how to add dyamic radio button labels. Labels are not showing in the radio button.
Apr 13, 2020
Hi there, not sure if you already found out the reason already or not.
I just recently faced this as well and i found out that RadioButtonLabel renders the label text by using the obj props passed in to them by looking at the node_modules.
Attached below is a snapshot of the RadioButtonLabel component codes (v2.7.4):
Since you are already using flatlist to handle the rendering, in your render component you should do something like this:
...
<RadioButtonLabel
obj={data.item} // iteration of flatlist's data
// other button label props...
/>
...
Also bear in mind that each of your "data.item" should look at least something like this to fulfil the component's requirement: { label: "xxx", value: "xxx" }
@amit13091992
Have you got solution, coz I m facing same problem...
Display dynamic data in flatlist radio button
Functionality is working but labels are not showing
I am rendering a dynamic form and creating the radio buttons, I am able to get the functionality of radio buttons but the radio button labels are not showing.
Below is my code snippet which I am creating inside a FlatList for dynamic radio buttons creation, but radio labels are not coming.
I have tried with solutions with creating the radio buttons with .map as well but it did not worked. Please provide some solution for my issue. Thanks in advance.
The text was updated successfully, but these errors were encountered: