Utilizing the Bootstrap 4 Collapse component.
My goal is to toggle between collapsible sections like "Categories" and "Brands", displaying only one at a time. The current issue is that multiple collapsible elements are visible simultaneously.
.view-custom-filters {
display: flex;
}
.view-collapse-button {
background: lightgrey;
width: 150px;
height: 50px;
display: table-cell;
text-align: center;
vertical-align: middle;
}
[code snippet]
I've tried using the data-parent
attribute on the .collapse
elements within a wrapper element, but encountered an error stating "Uncaught TypeError: Cannot read property 'querySelectorAll' of null."
.view-custom-filters {
display: flex;
}
.view-collapse-button {
background: lightgrey;
width: 150px;
height: 50px;
display: table-cell;
text-align: center;
vertical-align: middle;
}
[code snippet]
Any suggestions on how I can ensure that only one collapsible element is displayed at any given time?