Semantic-UI-React
Semantic-UI-React copied to clipboard
fix(Table): fix react key error on sibling cells with same string content
Fixes #4034, also include a test and documentation for tableData attribute usage in Table component.
Please have a look especially at line 68 of src/collections/Table/TableRow.js.
The newly created react key of "string containing" cells will have the following format (screenshot taken from docs):

In my opinion, this should be a good way to create "unique" keys for the cells because the cell index is also used for key creation.
But I don't know if creating the React Key attribute this way may have mentionable performance impact in huge lists. At least it should have a little but in sake of errorless rendering.
💖 Thanks for opening this pull request! 💖
Here is a list of things that will help get it across the finish line:
- Run
yarn lintlocally to catch formatting errors. This will fix some errors automatically, commit and push any changes. - Run
yarn testlocally to catch errors. This ensures all components still behave as they should. - Run
yarn startto run the doc site locally and try a few pages, ensuring everything is in good working order. - Include tests when adding/changing behavior.
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.
Codecov Report
Merging #4198 (a7dddc2) into master (bb2db59) will increase coverage by
0.00%. The diff coverage is100.00%.
@@ Coverage Diff @@
## master #4198 +/- ##
=======================================
Coverage 99.75% 99.75%
=======================================
Files 180 180
Lines 3241 3244 +3
=======================================
+ Hits 3233 3236 +3
Misses 8 8
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/collections/Table/TableRow.js | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update ff70355...a7dddc2. Read the comment docs.