Use links 'href' as list key in CollectionView
authorFrank Bessou <frank.bessou@logilab.fr>
Fri, 07 Apr 2017 14:29:44 +0200
changeset 97 7744b1901e7b
parent 96 288f2c1973f9
child 98 ef210fee86cc
Use links 'href' as list key in CollectionView
src/components/BaseViews.js
--- a/src/components/BaseViews.js	Fri Apr 07 14:16:13 2017 +0200
+++ b/src/components/BaseViews.js	Fri Apr 07 14:29:44 2017 +0200
@@ -25,7 +25,7 @@
             {
                 props.entities.data.mapItems(
                     entity => (
-                        <li className="list-group-item" key={entity.id}>
+                        <li className="list-group-item" key={entity.getLink('item').href}>
                             <CollectionItemLink entity={entity} etype={props.entities.etype} />
                         </li>
                         )