Added natural sorting for documents and collections

This commit is contained in:
Jori Lallo
2018-02-28 23:00:41 -08:00
parent 9142d975df
commit 4bc8a152c1
5 changed files with 20 additions and 4 deletions

View File

@@ -8,6 +8,7 @@ import stores from 'stores';
import Collection from 'models/Collection';
import ErrorsStore from 'stores/ErrorsStore';
import UiStore from 'stores/UiStore';
import naturalSort from 'shared/utils/naturalSort';
import type { PaginationParams } from 'types';
type Options = {
@@ -42,7 +43,7 @@ class CollectionsStore {
@computed
get orderedData(): Collection[] {
return _.sortBy(this.data.values(), 'name');
return naturalSort(Array.from(this.data.values()), 'name');
}
/**