From dad1da076d91e80dca171051aa05ca13909411ef Mon Sep 17 00:00:00 2001 From: Vins Date: Tue, 13 Feb 2024 10:00:44 +0100 Subject: [PATCH] Document types sorted alphabeticaly --- .../Layouts/DeedTypes/DeedTypesInformations/index.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/front/Components/Layouts/DeedTypes/DeedTypesInformations/index.tsx b/src/front/Components/Layouts/DeedTypes/DeedTypesInformations/index.tsx index b5454cab..9dad13f8 100644 --- a/src/front/Components/Layouts/DeedTypes/DeedTypesInformations/index.tsx +++ b/src/front/Components/Layouts/DeedTypes/DeedTypesInformations/index.tsx @@ -108,12 +108,12 @@ export default function DeedTypesInformations(props: IProps) { setSelectedDocuments(values as IOption[]); }, []); - const formattedOptions: IOption[] = availableDocuments.map((document) => { - return { + const formattedOptions: IOption[] = availableDocuments + .map((document) => ({ label: document.name, value: document.uid, - }; - }); + })) + .sort((a, b) => a.label.localeCompare(b.label)); return (