Semantic-UI-React icon indicating copy to clipboard operation
Semantic-UI-React copied to clipboard

fix(Table): fix react key error on sibling cells with same string content

Open jhns88 opened this issue 4 years ago • 2 comments

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):

react_key_prop

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.

jhns88 avatar May 02 '21 19:05 jhns88

💖 Thanks for opening this pull request! 💖

Here is a list of things that will help get it across the finish line:

  • Run yarn lint locally to catch formatting errors. This will fix some errors automatically, commit and push any changes.
  • Run yarn test locally to catch errors. This ensures all components still behave as they should.
  • Run yarn start to 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.

welcome[bot] avatar May 02 '21 19:05 welcome[bot]

Codecov Report

Merging #4198 (a7dddc2) into master (bb2db59) will increase coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@           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 data Powered by Codecov. Last update ff70355...a7dddc2. Read the comment docs.

codecov-commenter avatar May 02 '21 19:05 codecov-commenter