Skip to content

Commit dab315c

Browse files
authored
Merge pull request #1469 from saijatin28/bugfix-collections_#sketchesSorting
bugfix Collections Sorting - # of sketches is incorrect #1441
2 parents e5554cb + 1f342b7 commit dab315c

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)