bugfix Collections Sorting - # of sketches is incorrect #1441

This commit is contained in:
Sai Jatin K 2020-06-20 14:21:51 +05:30
parent b8ba3b911d
commit 1f342b72f3
No known key found for this signature in database
GPG key ID: 58A469B796EA80DF

View file

@ -37,6 +37,11 @@ const getSortedCollections = createSelector(
return orderBy(collections, 'name', 'desc');
}
return orderBy(collections, 'name', 'asc');
} else if (field === 'numItems') {
if (direction === DIRECTION.DESC) {
return orderBy(collections, 'items.length', 'desc');
}
return orderBy(collections, 'items.length', 'asc');
}
const sortedCollections = [...collections].sort((a, b) => {
const result =