Skip to content

Commit

Permalink
fix: Customized component has no key (#2637)
Browse files Browse the repository at this point in the history
  • Loading branch information
bravetheheat committed Sep 18, 2021
1 parent f5b8414 commit 6f2551e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/chart/generateCategoricalChart.tsx
Expand Up @@ -1994,8 +1994,9 @@ export const generateCategoricalChart = ({
return [graphicalItem, null];
};

renderCustomized = (element: React.ReactElement): React.ReactElement =>
renderCustomized = (element: React.ReactElement, displayName: string, index: number): React.ReactElement =>
cloneElement(element, {
key: `recharts-customized-${index}`,
...this.props,
...this.state,
});
Expand Down

0 comments on commit 6f2551e

Please sign in to comment.