问题:
index.js:1 Warning: Each child in a list should have a unique “key” prop.
Check the render method of
Body
. See Lists and Keys – React for more information.
at BodyRow (http://localhost:3000/static/js/vendors~main.chunk.js:138655:25)
at Body (http://localhost:3000/static/js/vendors~main.chunk.js:138976:19)
at table
at div
at div
at http://localhost:3000/static/js/vendors~main.chunk.js:139959:23
at div
at Table (http://localhost:3000/static/js/vendors~main.chunk.js:139974:25)
at div
at div
at Spin (http://localhost:3000/static/js/vendors~main.chunk.js:34498:94)
原因:
table -> Body -> BodyRow : 指表格数据没有key值。
解决方案:
给表格的dataSource每条数据中添加key值。