Skip to content

Commit

Permalink
fix: ignore case when sorting grouped authorities by name
Browse files Browse the repository at this point in the history
  • Loading branch information
Flaminia Cavallo authored and Flaminia Cavallo committed Jul 15, 2024
1 parent 6ac6565 commit 665e976
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 665e976

Please sign in to comment.