From cf00bddd6fa806041cd00eacf64c8a4df271474a Mon Sep 17 00:00:00 2001 From: Adam Fitzgibbon Date: Fri, 1 Nov 2019 13:00:59 -0500 Subject: [PATCH] add group by for hatchable sort (#11459) * add group by for hatchable sort * fix display bug when pets are owned --- website/client/src/components/inventory/stable/index.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/website/client/src/components/inventory/stable/index.vue b/website/client/src/components/inventory/stable/index.vue index 573abe4053..1f9f06d1af 100644 --- a/website/client/src/components/inventory/stable/index.vue +++ b/website/client/src/components/inventory/stable/index.vue @@ -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) {