Skip to content

Commit

Permalink
fix: Space item duplicate key (#22745)
Browse files Browse the repository at this point in the history
  • Loading branch information
shaodahong committed Mar 30, 2020
1 parent 40eae38 commit 0f2f270
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/space/index.tsx
Expand Up @@ -47,7 +47,8 @@ const Space: React.FC<SpaceProps> = props => {
{items.map((child, i) => (
<div
className={itemClassName}
key={`${itemClassName}-i`}
// eslint-disable-next-line react/no-array-index-key
key={`${itemClassName}-${i}`}
style={
i === len - 1
? {}
Expand Down

1 comment on commit 0f2f270

@RobelChina
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

解决的真及时!

Please sign in to comment.