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

Error on icon prop in Button: "Warning: Each child in a list should have a unique "key" prop." #1732

Closed
3 tasks done
RubenSibon opened this issue Nov 1, 2024 · 0 comments · Fixed by #1736
Closed
3 tasks done
Assignees
Labels
bug Something isn't working

Comments

@RubenSibon
Copy link
Contributor

RubenSibon commented Nov 1, 2024

Describe the issue

Summary

When setting the icon prop with an empty function, SVG or Icon component in a Button results in an error in the browser's console when running in a development environment: "Warning: Each child in a list should have a unique "key" prop."

Steps to reproduce

  1. Render a Button with an icon in development environment: <Button icon={() => {}}>Button</Button>
  2. Open the browser's console

Issue has been isolated and reproduced in CodeSandbox.

Environment

  • Browser: any browser
  • Operating System: any OS
  • Version of the design system: 0.13.0

Checklist

  • Search the issue tracker to ensure the issue has not already been reported.
  • Verify that the issue can be consistently reproduced.
  • Check if the issue is already documented.

Additional notes

@RubenSibon RubenSibon added the bug Something isn't working label Nov 1, 2024
@dlnr dlnr self-assigned this Nov 1, 2024
@dlnr dlnr linked a pull request Nov 1, 2024 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

2 participants