Closing other tabs when opening a new one?
kawern opened this issue · comments
Kasper commented
Hi, maybe its just me not reading the docs correctly, but is there a way to close other "tabs" when clicking (opening) a new one?
Glenn Flanagan commented
You can use the open
prop to manage the open state of the collapsible, so you'd need to close all other collapsibles from a parent component.
I did create this (but it's not maintained) but it'll give you an idea on how to do it https://github.com/glennflanagan/react-responsive-accordion