react-native-accordion icon indicating copy to clipboard operation
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?

Open andrisole92 opened this issue 7 years ago • 2 comments

andrisole92 avatar Jul 30 '17 18:07 andrisole92

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 Accordions 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 avatar Aug 07 '17 18:08 Zomis

@Zomis can you show the example code for this logic

ishaqashraf avatar May 13 '18 15:05 ishaqashraf