Skip to content

Commit

Permalink
[@mantine/core] NavLink: Fix collapse for nested links being rendered…
Browse files Browse the repository at this point in the history
… even if there are no child links (#7133)
  • Loading branch information
rtivital committed Nov 19, 2024
1 parent 836280e commit 4ec3655
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/@mantine/core/src/components/NavLink/NavLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,11 @@ export const NavLink = polymorphicFactory<NavLinkFactory>((_props, ref) => {
</Box>
)}
</UnstyledButton>
<Collapse in={_opened} {...getStyles('collapse')}>
<div {...getStyles('children')}>{children}</div>
</Collapse>
{withChildren && (
<Collapse in={_opened} {...getStyles('collapse')}>
<div {...getStyles('children')}>{children}</div>
</Collapse>
)}
</>
);
});
Expand Down

0 comments on commit 4ec3655

Please sign in to comment.