diff --git a/client/modules/IDE/selectors/collections.js b/client/modules/IDE/selectors/collections.js index f212103a..dd052aab 100644 --- a/client/modules/IDE/selectors/collections.js +++ b/client/modules/IDE/selectors/collections.js @@ -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 =