From b930652f8714ce81873d31c9756b6948dd5538e2 Mon Sep 17 00:00:00 2001 From: axgu Date: Mon, 3 Jun 2024 15:54:37 -0400 Subject: [PATCH] sort display and categories alphabetically --- src/pages/manage/items/create.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/pages/manage/items/create.tsx b/src/pages/manage/items/create.tsx index 0bb7ef6..6da5f84 100644 --- a/src/pages/manage/items/create.tsx +++ b/src/pages/manage/items/create.tsx @@ -137,7 +137,15 @@ const CreateItem: NextPageWithLayout = () => { { + if (a === 'OTHER') { + return 1; + } + if (b === 'OTHER') { + return -1; + } + return a.localeCompare(b); + })} displayValue={(prop) => Categories[prop]} keyValue={(prop) => prop} name="categories"