Rename 'entities' attribute to 'collection' in CollectionView
authorFrank Bessou <frank.bessou@logilab.fr>
Tue, 02 May 2017 17:51:43 +0200
changeset 169 714955dfe4c4
parent 168 10d89202f063
child 170 94800ba78d15
Rename 'entities' attribute to 'collection' in CollectionView
src/components/BaseViews.js
src/components/Entities.js
--- a/src/components/BaseViews.js	Tue May 02 17:47:15 2017 +0200
+++ b/src/components/BaseViews.js	Tue May 02 17:51:43 2017 +0200
@@ -23,7 +23,7 @@
     return (
         <ul className="list-group">
             {
-                props.entities.data.mapItems(
+                props.collection.data.mapItems(
                     item => (
                         <li className="list-group-item" key={item.getLink('item').href}>
                             <CollectionItemLink item={item} />
@@ -36,7 +36,7 @@
 }
 
 CollectionView.propTypes = {
-    entities: PropTypesResourceModel.isRequired,
+    collection: PropTypesResourceModel.isRequired,
 };
 
 export function ActionsDropDown({target, ignore=[]}) {
--- a/src/components/Entities.js	Tue May 02 17:47:15 2017 +0200
+++ b/src/components/Entities.js	Tue May 02 17:51:43 2017 +0200
@@ -46,7 +46,7 @@
 
     function renderEntities() {
         if (!isEmpty(props.entities)) {
-            return <CollectionView entities={props.entities} />;
+            return <CollectionView collection={props.entities} />;
         }
 
         return <div className="text-mutted">