Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion apps/docs/app/patterns/components/client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ export const CompsSidebarClient = ({ pages }: CompsSidebarClientProps) => {

return (
<Collapsible
// Seems group hasn't declared yet, this is important to listen the group-data state change
className="group/collapsible"
key={subgroup.name}
onOpenChange={(open) => {
setOpenSubgroups((prev) => {
Expand All @@ -233,7 +235,8 @@ export const CompsSidebarClient = ({ pages }: CompsSidebarClientProps) => {
<CollapsibleTrigger asChild>
<SidebarMenuButton className="capitalize">
{subgroup.name}
<ChevronDown className="ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180" />
{/* this chevron group-data now listen to group/collapsible */}
<ChevronDown className="ml-auto transition-transform rotate-0 group-data-[state=open]/collapsible:-rotate-180" />
</SidebarMenuButton>
</CollapsibleTrigger>
<CollapsibleContent>
Expand Down