Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

Fixes warning for missing keys in example color controls #1853

Closed
wants to merge 1 commit into from

Conversation

claudiopro
Copy link
Contributor

@claudiopro claudiopro commented Sep 4, 2018

Summary

Fixes a warning in the color examples for missing keys for elements in an array for the style controls.

react.development.js:336 Warning: Each child in an array or iterator should have a unique "key" prop.

Check the render method of `ColorControls`. See https://fb.me/react-warning-keys for more information.
    in StyleButton (created by ColorControls)
    in ColorControls (created by ColorfulEditorExample)
    in div (created by ColorfulEditorExample)
    in ColorfulEditorExample

Test Plan

Manual tests on Chrome, warnings are gone

Note: This PR also fixes the Travis CI build failure introduced with e6c693c

@claudiopro claudiopro requested a review from flarnie September 4, 2018 14:10
@claudiopro claudiopro changed the title Fixes warning for missing keys in color controls Fixes warning for missing keys in example color controls Sep 4, 2018
@claudiopro claudiopro requested review from niveditc and removed request for flarnie September 4, 2018 16:52
Copy link

@elboman elboman left a comment

Choose a reason for hiding this comment

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

Looks good!

@claudiopro
Copy link
Contributor Author

claudiopro commented Sep 4, 2018

Thanks @elboman, I'll rebase when #1854 lands before merging 😄

Copy link
Contributor

@niveditc niveditc left a comment

Choose a reason for hiding this comment

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

Looks good! 👍

@claudiopro
Copy link
Contributor Author

@niveditc 🎉

Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

claudiopro is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

jdecked pushed a commit to twitter-forks/draft-js that referenced this pull request Oct 9, 2019
…hive#1853)

Summary:
**Summary**

Fixes a warning in the color examples for missing keys for elements in an array for the style controls.

```
react.development.js:336 Warning: Each child in an array or iterator should have a unique "key" prop.

Check the render method of `ColorControls`. See https://fb.me/react-warning-keys for more information.
    in StyleButton (created by ColorControls)
    in ColorControls (created by ColorfulEditorExample)
    in div (created by ColorfulEditorExample)
    in ColorfulEditorExample
```

**Test Plan**

Manual tests on Chrome, warnings are gone

**Note:** This PR also fixes the [Travis CI build failure](https://travis-ci.org/facebook/draft-js/jobs/424170309) introduced with e6c693c
Pull Request resolved: facebookarchive#1853

Differential Revision: D9654616

fbshipit-source-id: 1e4e9a4ef2eb896306404acc31623076e107b91c
alicayan008 pushed a commit to alicayan008/draft-js that referenced this pull request Jul 4, 2023
Summary:
**Summary**

Fixes a warning in the color examples for missing keys for elements in an array for the style controls.

```
react.development.js:336 Warning: Each child in an array or iterator should have a unique "key" prop.

Check the render method of `ColorControls`. See https://fb.me/react-warning-keys for more information.
    in StyleButton (created by ColorControls)
    in ColorControls (created by ColorfulEditorExample)
    in div (created by ColorfulEditorExample)
    in ColorfulEditorExample
```

**Test Plan**

Manual tests on Chrome, warnings are gone

**Note:** This PR also fixes the [Travis CI build failure](https://travis-ci.org/facebook/draft-js/jobs/424170309) introduced with e6c693c
Pull Request resolved: facebookarchive/draft-js#1853

Differential Revision: D9654616

fbshipit-source-id: 1e4e9a4ef2eb896306404acc31623076e107b91c
aforismesen added a commit to aforismesen/draft-js that referenced this pull request Jul 12, 2024
Summary:
**Summary**

Fixes a warning in the color examples for missing keys for elements in an array for the style controls.

```
react.development.js:336 Warning: Each child in an array or iterator should have a unique "key" prop.

Check the render method of `ColorControls`. See https://fb.me/react-warning-keys for more information.
    in StyleButton (created by ColorControls)
    in ColorControls (created by ColorfulEditorExample)
    in div (created by ColorfulEditorExample)
    in ColorfulEditorExample
```

**Test Plan**

Manual tests on Chrome, warnings are gone

**Note:** This PR also fixes the [Travis CI build failure](https://travis-ci.org/facebook/draft-js/jobs/424170309) introduced with d267826
Pull Request resolved: facebookarchive/draft-js#1853

Differential Revision: D9654616

fbshipit-source-id: 1e4e9a4ef2eb896306404acc31623076e107b91c
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants