Skip to content

Commit

Permalink
fix: 修复 key
Browse files Browse the repository at this point in the history
  • Loading branch information
crazyair committed Nov 8, 2022
1 parent 5a61762 commit 6a6ac57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ function List<T>({

listItemsKeys[index] = key;

return renderItem(item, index);
return <React.Fragment key={key}>{renderItem(item, index)}</React.Fragment>;
};

const isSomethingAfterLastItem = () => !!(loadMore || pagination || footer);
Expand Down

0 comments on commit 6a6ac57

Please sign in to comment.