From 07c12e66d37615745eb5fe8f2bce325aadee0807 Mon Sep 17 00:00:00 2001
From: cretadn22 <cretadn22@gmail.com>
Date: Sun, 4 Aug 2024 11:39:52 +0700
Subject: [PATCH] add sort func to initial page

---
 .../ReportFieldsInitialListValuePicker.tsx                      | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/pages/workspace/reportFields/InitialListValueSelector/ReportFieldsInitialListValuePicker.tsx b/src/pages/workspace/reportFields/InitialListValueSelector/ReportFieldsInitialListValuePicker.tsx
index 18f9f9d65259..7fa96c5d9e74 100644
--- a/src/pages/workspace/reportFields/InitialListValueSelector/ReportFieldsInitialListValuePicker.tsx
+++ b/src/pages/workspace/reportFields/InitialListValueSelector/ReportFieldsInitialListValuePicker.tsx
@@ -1,6 +1,7 @@
 import React, {useMemo} from 'react';
 import SelectionList from '@components/SelectionList';
 import RadioListItem from '@components/SelectionList/RadioListItem';
+import localeCompare from '@libs/LocaleCompare';
 
 type ReportFieldsInitialListValuePickerProps = {
     /** Options to select from if field is of type list */
@@ -22,6 +23,7 @@ function ReportFieldsInitialListValuePicker({listValues, disabledOptions, value,
             {
                 data: Object.values(listValues ?? {})
                     .filter((listValue, index) => !disabledOptions[index])
+                    .sort((a, b) => localeCompare(a, b))
                     .map((listValue) => ({
                         keyForList: listValue,
                         value: listValue,