Skip to content

Commit

Permalink
update sort func after map func
Browse files Browse the repository at this point in the history
  • Loading branch information
cretadn22 committed Aug 5, 2024
1 parent 07c12e6 commit aee49ca
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function ReportFieldsListValuesPage({

const listValuesSections = useMemo(() => {
const data = listValues
.sort((a, b) => localeCompare(a, b))
// .sort((a, b) => localeCompare(a, b))
.map<ValueListItem>((value, index) => ({
value,
index,
Expand All @@ -101,8 +101,8 @@ function ReportFieldsListValuesPage({
labelText={disabledListValues[index] ? translate('workspace.common.disabled') : translate('workspace.common.enabled')}
/>
),
}));

}))
.sort((a, b) => localeCompare(a.value, b.value));
return [{data, isDisabled: false}];
}, [disabledListValues, listValues, policy?.fieldList, reportFieldID, selectedValues, translate]);

Expand Down

0 comments on commit aee49ca

Please sign in to comment.