react-native-accordion
react-native-accordion copied to clipboard
Is it possible have only one open item in the list, and close others, when clicking on new row item?
Read the documentation (README.md) and you will see that there are methods: open
, close
and toggle
on an Accordion
.
That should be all you need to know to be able to implement this yourself.
Try keeping your Accordion
s in a list and loop over your list and close all of them except the just recently clicked one when an item is clicked.
@Zomis can you show the example code for this logic