Edit collection (#173)
* Collection edit modal * Add icon * 💚 * Oh look, some specs * Delete collection * Remove from collection * Handle error responses Protect against deleting last collection * Fix key * 💚 * Keyboard navigate documents list * Add missing database constraints
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import React from 'react';
|
||||
import Document from 'models/Document';
|
||||
import DocumentPreview from 'components/DocumentPreview';
|
||||
import ArrowKeyNavigation from 'boundless-arrow-key-navigation';
|
||||
|
||||
class DocumentList extends React.Component {
|
||||
props: {
|
||||
@@ -10,12 +11,15 @@ class DocumentList extends React.Component {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
<ArrowKeyNavigation
|
||||
mode={ArrowKeyNavigation.mode.VERTICAL}
|
||||
defaultActiveChildIndex={0}
|
||||
>
|
||||
{this.props.documents &&
|
||||
this.props.documents.map(document => (
|
||||
<DocumentPreview key={document.id} document={document} />
|
||||
))}
|
||||
</div>
|
||||
</ArrowKeyNavigation>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user