add group by for hatchable sort (#11459)
* add group by for hatchable sort * fix display bug when pets are owned
This commit is contained in:
committed by
Matteo Pagliazzi
parent
dfd79c9c1a
commit
cf00bddd6f
@@ -767,7 +767,6 @@ export default {
|
||||
case 'sortByHatchable': {
|
||||
if (isPetList) {
|
||||
const sortFunc = i => (i.isHatchable() ? 0 : 1);
|
||||
|
||||
animals = _sortBy(animals, [sortFunc]);
|
||||
}
|
||||
break;
|
||||
@@ -800,8 +799,10 @@ export default {
|
||||
groupKey = 'potionKey';
|
||||
} else if (sortBy === 'AZ') {
|
||||
groupKey = '';
|
||||
} else if (sortBy === 'sortByHatchable') {
|
||||
groupKey = i => (i.isHatchable() ? 0 : 1);
|
||||
}
|
||||
|
||||
|
||||
return groupBy(pets, groupKey);
|
||||
},
|
||||
mounts (animalGroup, hideMissing, sortBy, searchText) {
|
||||
|
||||
Reference in New Issue
Block a user