From 95a0bf0c5c1c63a47995a15b202f2682ee961ae5 Mon Sep 17 00:00:00 2001 From: Durran Jordan Date: Wed, 21 Sep 2016 11:14:12 +0200 Subject: [PATCH 1/2] INT-1844: Namespace documents with collection name --- src/internal-packages/crud/lib/component/document-list.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/internal-packages/crud/lib/component/document-list.jsx b/src/internal-packages/crud/lib/component/document-list.jsx index 4725f45b9c9..e2dc742cea7 100644 --- a/src/internal-packages/crud/lib/component/document-list.jsx +++ b/src/internal-packages/crud/lib/component/document-list.jsx @@ -204,7 +204,7 @@ class DocumentList extends React.Component { */ renderDocuments(docs) { return _.map(docs, (doc) => { - return (); + return (); }); } From c2c81a65870cfd7aaa43378495e67926153b5a1b Mon Sep 17 00:00:00 2001 From: Durran Jordan Date: Wed, 21 Sep 2016 11:52:26 +0200 Subject: [PATCH 2/2] INT-1844/INT-1841: Convert object id to json --- .../crud/lib/component/document-list.jsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/internal-packages/crud/lib/component/document-list.jsx b/src/internal-packages/crud/lib/component/document-list.jsx index e2dc742cea7..5547f1ce52c 100644 --- a/src/internal-packages/crud/lib/component/document-list.jsx +++ b/src/internal-packages/crud/lib/component/document-list.jsx @@ -204,10 +204,21 @@ class DocumentList extends React.Component { */ renderDocuments(docs) { return _.map(docs, (doc) => { - return (); + return (); }); } + /** + * Get the key for a doc. + * + * @param {Document} doc - The document. + * + * @returns {String} The unique key. + */ + _key(doc) { + return `${NamespaceStore.ns}_${JSON.stringify(doc._id)}` + } + /** * Determine if the component should update. *