Order sidebar collections alphabetically
This commit is contained in:
@@ -33,7 +33,7 @@ type Props = {
|
||||
return (
|
||||
<Flex column>
|
||||
<Header>Collections</Header>
|
||||
{collections.data.map(collection => (
|
||||
{collections.orderedData.map(collection => (
|
||||
<CollectionLink
|
||||
key={collection.id}
|
||||
history={history}
|
||||
|
||||
@@ -48,6 +48,10 @@ class CollectionsStore {
|
||||
: undefined;
|
||||
}
|
||||
|
||||
@computed get orderedData(): Collection[] {
|
||||
return _.sortBy(this.data, collection => collection.name);
|
||||
}
|
||||
|
||||
/**
|
||||
* List of paths to each of the documents, where paths are composed of id and title/name pairs
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user