Skip to content

Commit

Permalink
Merge pull request #48814 from Tony-MK/fix/48496
Browse files Browse the repository at this point in the history
Sorting multi-select fields in the advanced search filter page
  • Loading branch information
puneetlath authored Sep 16, 2024
2 parents 8d563ca + eb7d625 commit 67dff6b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/Search/AdvancedSearchFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import useSingleExecution from '@hooks/useSingleExecution';
import useThemeStyles from '@hooks/useThemeStyles';
import useWaitForNavigation from '@hooks/useWaitForNavigation';
import {convertToDisplayStringWithoutCurrency} from '@libs/CurrencyUtils';
import localeCompare from '@libs/LocaleCompare';
import Navigation from '@libs/Navigation/Navigation';
import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils';
import {getAllTaxRates} from '@libs/PolicyUtils';
Expand Down Expand Up @@ -174,7 +175,7 @@ function getFilterDisplayTitle(filters: Partial<SearchAdvancedFiltersForm>, fiel
filters[fieldName]
) {
const filterArray = filters[fieldName] ?? [];
return filterArray.join(', ');
return filterArray.sort(localeCompare).join(', ');
}

if (fieldName === CONST.SEARCH.SYNTAX_FILTER_KEYS.DESCRIPTION) {
Expand Down

0 comments on commit 67dff6b

Please sign in to comment.