Skip to content

Commit 17cafe7

Browse files
small fix to hidden count (#13178)
1 parent 9921e9e commit 17cafe7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/manager/src/features/IAM/Users/UserRoles/AssignedEntities.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ export const AssignedEntities = ({
8383
addEllipsis
8484
customOverflowButton={(numHiddenByTruncate) => {
8585
const numHiddenItems =
86-
totalCount - MAX_ITEMS_TO_RENDER + numHiddenByTruncate;
86+
totalCount <= MAX_ITEMS_TO_RENDER
87+
? numHiddenByTruncate
88+
: totalCount - MAX_ITEMS_TO_RENDER + numHiddenByTruncate;
8789

8890
return (
8991
<Box

0 commit comments

Comments
 (0)