Open rohananarse opened 7 years ago
@rohananarse I think that's logic that naturally goes into you app and not the Panel component itself.
Actually, I think what you maybe want is an Accordion and not a Panel component. You may try: https://github.com/naoufal/react-native-accordion (the gif there doesn't show your behavior, but it should work like you describe).
NB: From a UX standpoint I would advise against implementing the behavior you describe, because users may find it annoying and confusing that one action (opening second panel) has an unexpected side effect (closing the first panel). If the issue is "user having to clean up previously opened panels", you may try a button which collapses all panels. You can even make it a toggle: Like gmail's expand/collapse for mail threads.
hi i have added multiple panels in my project. would like to know if i can make the first opened panel close progranmatically when i click on the second panel..??
Please let me know