Home > database >  How do I make the sub items selectable particular under Accordion in react-native?
How do I make the sub items selectable particular under Accordion in react-native?

Time:07-21

I'm making custom Accordion with custom sub items as radio buttons. As you can see, I already create the accordion but stuck in selection of the sub item.

The issue is the when I select one item then all sub-items under that main accordion tab are selects. I want the particular one should be selected when select and the default the first one should be selected when anyone comes to this page like as first accordion tab is expanded and first sub-item should be selected.

Please help me. Below is the full code expo link mentioned:

enter image description here

CodePudding user response:

checkout the updated code here : https://snack.expo.dev/T1q7WFzPP

Had some issues with the logic of your subcategory item selection. And thanks for providing expo link.

  • Related