app/components/avo/sidebar/section_component.html.erb in avo-2.2.2 vs app/components/avo/sidebar/section_component.html.erb in avo-2.3.0

- old
+ new

@@ -1,14 +1,14 @@ <div class="space-y-1" <% if collapsable %> data-controller="menu" data-menu-target="self" data-menu-key-param="<%= key %>" - data-menu-collapsed-param="<%= collapsed ? 'collapsed' : 'expanded' %>" + data-menu-default-collapsed-state="<%= collapsed ? 'collapsed' : 'expanded' %>" <% end %> > - <%= render Avo::Sidebar::HeadingComponent.new label: item.name, icon: helpers.svg(icon, class: 'h-5'), collapsable: item.collapsable, key: key %> - <div class="w-full space-y-1" data-menu-target="items"> + <%= render Avo::Sidebar::HeadingComponent.new label: item.name, icon: helpers.svg(icon, class: "h-5"), collapsable: item.collapsable, collapsed: collapsed, key: key %> + <div class="w-full space-y-1 <%= 'hidden' if collapsed %>" data-menu-target="items"> <% items.each do |item| %> <%= render Avo::Sidebar::ItemSwitcherComponent.new item: item %> <% end %> </div> </div>