Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[@nivo/bar v.0.86.0] React warning about unique key prop when using bar totals #2574

Closed
tn opened this issue Apr 30, 2024 · 0 comments · Fixed by #2575
Closed

[@nivo/bar v.0.86.0] React warning about unique key prop when using bar totals #2574

tn opened this issue Apr 30, 2024 · 0 comments · Fixed by #2575

Comments

@tn
Copy link

tn commented Apr 30, 2024

Describe/explain the bug
React warning message: Each child in a list should have a unique "key" prop.

To Reproduce
Please follow codesandbox link or create simple bar chart:

const data = [
  { id: "one", value: 1, label: "One" },
  { id: "two", value: 2, label: "Two" },
  { id: "three", value: 3, label: "Three" },
];

<ResponsiveBar data={data} enableTotals />

Steps to reproduce the behavior:

  1. Create simple bar chart
  2. Add enableTotals prop
  3. Open console
  4. See error: Each child in a list should have a unique "key" prop.

Expected behavior
No unique key warning

Screenshots
Screenshot 2024-04-30 at 20 28 37

Desktop (please complete the following information):

  • OS: any OS
  • Browser any browser

Smartphone (please complete the following information):

  • Device: any
  • OS: any
  • Browser any
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant