Skip to content

Commit

Permalink
fix(mega-menu): show sub grid only if there are children
Browse files Browse the repository at this point in the history
  • Loading branch information
ichim-david committed Jan 10, 2023
1 parent b4230fb commit ddfbd82
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ui/Header/HeaderMenuPopUp.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ const createColumns = (item, length, renderMenuItem) => {
const ItemGrid = ({ item, columns, length, renderMenuItem }) => (
<>
{renderMenuItem(item, { className: 'sub-title' })}
<Grid columns={columns}>{createColumns(item, length, renderMenuItem)}</Grid>
{item.items.length ? (
<Grid columns={columns}>
{createColumns(item, length, renderMenuItem)}
</Grid>
) : null}
</>
);

Expand Down

0 comments on commit ddfbd82

Please sign in to comment.