Skip to content

Commit

Permalink
fix(avatargroup): children의 key가 없을 경우에만 key를 넣어주도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
sungik-choi committed Jun 25, 2021
1 parent 4d3b7c9 commit 8399639
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Avatars/AvatarGroup/AvatarGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ forwardedRef: React.Ref<HTMLDivElement>,
) {
const renderAvatarElement = useCallback((avatar: React.ReactElement<AvatarProps>) => (
React.cloneElement(avatar, {
key: `${avatar.props.name}-${avatar.props.avatarUrl}`,
key: avatar.key ?? `${avatar.props.name}-${avatar.props.avatarUrl}`,
size,
showBorder: avatar.props.showBorder || spacing < 0,
})
Expand Down

0 comments on commit 8399639

Please sign in to comment.