Skip to content

Commit

Permalink
Added Slice condition for single elements on more menu item
Browse files Browse the repository at this point in the history
  • Loading branch information
rbatistadev committed Jun 14, 2024
1 parent b308693 commit 5764faf
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ const ChildEntityLinks = (props: ChildEntityLinksProps): JSX.Element => {
}

const childEntitiesCopy = [...childEntities];
const visibleChildEntitiesSlice = childEntitiesCopy.length <= 2 ? 3 : 2
const visibleChildEntities = childEntitiesCopy.splice(
0,
2 - firstActionButtonNum
visibleChildEntitiesSlice - firstActionButtonNum
);

return (
Expand Down

0 comments on commit 5764faf

Please sign in to comment.