diff --git a/application/src/View/Helper/ItemSetSelector.php b/application/src/View/Helper/ItemSetSelector.php index dbf624d3b..e0abb8474 100644 --- a/application/src/View/Helper/ItemSetSelector.php +++ b/application/src/View/Helper/ItemSetSelector.php @@ -31,6 +31,12 @@ public function __invoke($includeClosedSets = false) $itemSetOwners[$email]['owner'] = $owner; $itemSetOwners[$email]['item_sets'][] = $itemSet; } + // Sort the item sets by title. + foreach ($itemSetOwners as $email => $itemSetOwner) { + usort($itemSetOwners[$email]['item_sets'], function ($a, $b) { + return strcmp($a->displayTitle(), $b->displayTitle()); + }); + } return $this->getView()->partial( 'common/item-set-selector',