Merge pull request #1469 from saijatin28/bugfix-collections_#sketchesSorting
bugfix Collections Sorting - # of sketches is incorrect #1441
This commit is contained in:
commit
dab315cf1c
1 changed files with 5 additions and 0 deletions
|
@ -37,6 +37,11 @@ const getSortedCollections = createSelector(
|
||||||
return orderBy(collections, 'name', 'desc');
|
return orderBy(collections, 'name', 'desc');
|
||||||
}
|
}
|
||||||
return orderBy(collections, 'name', 'asc');
|
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 sortedCollections = [...collections].sort((a, b) => {
|
||||||
const result =
|
const result =
|
||||||
|
|
Loading…
Reference in a new issue