From e15644083d6b9d914bb6bbdbf65699e329d536fa Mon Sep 17 00:00:00 2001 From: mheggelund Date: Wed, 9 Oct 2024 13:34:24 +0200 Subject: [PATCH] chore: Sort lists in GDE. --- .../GdeSelect/GdeSelect.tsx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/components/GrossDepositionEnviroment/GdeSelect/GdeSelect.tsx b/src/components/GrossDepositionEnviroment/GdeSelect/GdeSelect.tsx index 541878e..2e53aca 100644 --- a/src/components/GrossDepositionEnviroment/GdeSelect/GdeSelect.tsx +++ b/src/components/GrossDepositionEnviroment/GdeSelect/GdeSelect.tsx @@ -38,11 +38,17 @@ export const GdeSelect = ({ (g) => g.geologyGroup === 'ArchitecturalElement', ); + const sortList = (data: any) => { + return data.sort((a: any, b: any) => + a.identifier.localeCompare(b.identifier), + ); + }; + return ( a.identifier.localeCompare(b.identifier))} optionLabel={(option) => option.identifier} onOptionsChange={(e: AutocompleteChanges) => { setGdeObject({ @@ -56,7 +62,7 @@ export const GdeSelect = ({ option.identifier} onOptionsChange={(e: AutocompleteChanges) => { setGdeObject({ @@ -70,7 +76,7 @@ export const GdeSelect = ({ option.identifier} onOptionsChange={(e: AutocompleteChanges) => { setGdeObject({ @@ -84,7 +90,7 @@ export const GdeSelect = ({ option.identifier} onOptionsChange={(e: AutocompleteChanges) => { setGdeObject({