-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with Flexdirection:'row' #5
Comments
Could you take screenshot or explain more info, please. Thank you. |
@kamleshchandnani would you please explain me the mapping concept in your code for index field. I need to make selectedIndex = {this.state.index} so that already saved radio button will appear as selected. Please help me with this. All i want to ask is how did you create your array of "data" with respective index value? |
@khushboogupta1 [
{
"id": 1,
"name": "Item1"
},
{
"id": 2,
"name": "Item2"
},
{
"id": 3,
"name": "Item3"
}
] I passed onSelect a function like below onSelect={(index, value) => { this.changeHandler('categoryValue', value, index) }} so I also pass index to this function along with 'categoryValue' and index, and the 'changeHandler' function is implemented in the following way. changeHandler = (type, value, index) => {
if(type = "categoryValue"){
this.setState({
categoryValue: value,
categoryIndex: index
})
}
} So the radio gets selected as because |
Were you able to place radio buttons on a single row? |
I only placed style={{flexDirection:'row'}} in RadioGroup and my button is in row now. |
When i set flex direction to row and flexWrap to 'wrap' then there is unnecessary height the radio button takes up, also it doesn't grows the parent container to show all the radios
css
The text was updated successfully, but these errors were encountered: