We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bcfc228 commit acc61b4Copy full SHA for acc61b4
src/internal-packages/crud/lib/component/document-list.jsx
@@ -204,10 +204,21 @@ class DocumentList extends React.Component {
204
*/
205
renderDocuments(docs) {
206
return _.map(docs, (doc) => {
207
- return (<Document doc={doc} key={doc._id} />);
+ return (<Document doc={doc} key={this._key(doc)} editable />);
208
});
209
}
210
211
+ /**
212
+ * Get the key for a doc.
213
+ *
214
+ * @param {Document} doc - The document.
215
216
+ * @returns {String} The unique key.
217
+ */
218
+ _key(doc) {
219
+ return `${NamespaceStore.ns}_${JSON.stringify(doc._id)}`
220
+ }
221
+
222
/**
223
* Determine if the component should update.
224
*
0 commit comments