Skip to content

Commit

Permalink
Merge pull request #1423 from dhis2/DHIS2-10843/v40/ignore-case-when-…
Browse files Browse the repository at this point in the history
…sorting-authorities

fix: ignore case when sorting grouped authorities by name (v40)
  • Loading branch information
flaminic authored Jul 17, 2024
2 parents dba80b0 + 4bcd7c4 commit 5cbf1f7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/RoleForm/groupAuthorities/groupAuthorities.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ const groupForAuthority = (auth) => {
const sortGroupedAuthorities = (groupedAuthorities) => {
const sortedGroupedAuthorities = {}
for (const [group, items] of Object.entries(groupedAuthorities)) {
sortedGroupedAuthorities[group] = sortBy(items, 'name')
sortedGroupedAuthorities[group] = sortBy(items, (item) =>
item.name?.toLowerCase()
)
}
return sortedGroupedAuthorities
}
Expand Down

0 comments on commit 5cbf1f7

Please sign in to comment.