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

fix: Resolve warnings against missing array keys in Button #1736

Merged
merged 9 commits into from
Nov 4, 2024

Conversation

dlnr
Copy link
Contributor

@dlnr dlnr commented Nov 1, 2024

Describe the pull request

Thank you for contributing to the project!
Please use this template to help us handle your PR smoothly.

What

The content function with a switch produces children without a key.

Why

To prevent an error.

How

Added key to single child which should not be needed, It must have something to do with the wrapping content function that produces content as a Reactnode. Ended up restoring an earlier approach with multiple conditions in the render function, which doesn’t even need any keys.

Checklist

Before submitting your pull request, please ensure you have done the following. Check each checkmark if you have done so or if it wasn't necessary:

Additional notes

  • Provide links to any related issues or discussions.
  • Add a link to the specific story in the feature branch deploy.
  • Mention any areas where additional review or feedback is needed.

RubenSibon
RubenSibon previously approved these changes Nov 1, 2024
Copy link
Contributor

@RubenSibon RubenSibon left a comment

Choose a reason for hiding this comment

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

Easy!

@github-actions github-actions bot temporarily deployed to demo-1732-error-on-icon-prop November 4, 2024 11:35 Destroyed
@VincentSmedinga VincentSmedinga changed the title fix: Always give icon a key fix: Add missing key to icon in array Nov 4, 2024
VincentSmedinga
VincentSmedinga previously approved these changes Nov 4, 2024
@VincentSmedinga VincentSmedinga dismissed their stale review November 4, 2024 13:57

Needs to be more robust

@github-actions github-actions bot temporarily deployed to demo-1732-error-on-icon-prop November 4, 2024 14:04 Destroyed
@github-actions github-actions bot temporarily deployed to demo-1732-error-on-icon-prop November 4, 2024 14:06 Destroyed
@github-actions github-actions bot temporarily deployed to demo-1732-error-on-icon-prop November 4, 2024 14:34 Destroyed
@VincentSmedinga VincentSmedinga changed the title fix: Add missing key to icon in array fix: Resolve warnings against missing array keys in Button Nov 4, 2024
@github-actions github-actions bot temporarily deployed to demo-1732-error-on-icon-prop November 4, 2024 14:51 Destroyed
@github-actions github-actions bot temporarily deployed to demo-1732-error-on-icon-prop November 4, 2024 14:53 Destroyed
@github-actions github-actions bot temporarily deployed to demo-1732-error-on-icon-prop November 4, 2024 14:57 Destroyed
@alimpens alimpens merged commit c60c897 into develop Nov 4, 2024
6 checks passed
@alimpens alimpens deleted the fix/1732-error-on-icon-prop branch November 4, 2024 15:31
@github-actions github-actions bot mentioned this pull request Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

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