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

Commit 4a5ad07

Browse files
Claudio Procidafacebook-github-bot
authored andcommitted
Fixes warning for missing keys in example color controls (#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: #1853 Differential Revision: D9654616 fbshipit-source-id: 1e4e9a4ef2eb896306404acc31623076e107b91c
1 parent 8d3cfba commit 4a5ad07

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

examples/draft-0-10-0/color/color.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@
146146
<div style={styles.controls}>
147147
{COLORS.map(type =>
148148
<StyleButton
149+
key={type.label}
149150
active={currentStyle.has(type.style)}
150151
label={type.label}
151152
onToggle={props.onToggle}

examples/draft-0-9-1/color/color.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@
146146
<div style={styles.controls}>
147147
{COLORS.map(type =>
148148
<StyleButton
149+
key={type.label}
149150
active={currentStyle.has(type.style)}
150151
label={type.label}
151152
onToggle={props.onToggle}

meta/bundle-size-stats/Draft.js.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

meta/bundle-size-stats/Draft.min.js.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)