Skip to content

Commit 1f342b7

Browse files
committed
bugfix Collections Sorting - # of sketches is incorrect #1441
1 parent b8ba3b9 commit 1f342b7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

client/modules/IDE/selectors/collections.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ const getSortedCollections = createSelector(
3737
return orderBy(collections, 'name', 'desc');
3838
}
3939
return orderBy(collections, 'name', 'asc');
40+
} else if (field === 'numItems') {
41+
if (direction === DIRECTION.DESC) {
42+
return orderBy(collections, 'items.length', 'desc');
43+
}
44+
return orderBy(collections, 'items.length', 'asc');
4045
}
4146
const sortedCollections = [...collections].sort((a, b) => {
4247
const result =

0 commit comments

Comments
 (0)