Skip to content

Commit

Permalink
Sort activities alphabetically in Goal new/edit screen under categories
Browse files Browse the repository at this point in the history
Closes #6
  • Loading branch information
MoOx committed Mar 19, 2021
1 parent 00dd843 commit e344af5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/GoalEdit.res
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,9 @@ let make = (
<ListSeparator spaceStart />
{opened
? categoryActivities
->SortArray.stableSortBy((a, b) =>
a.title > b.title ? 1 : a.title < b.title ? -1 : 0
)
->Array.mapWithIndex((index, activity) => {
let selected =
selectedCat || activitiesSelected->Array.some(key => key == activity.id)
Expand Down

0 comments on commit e344af5

Please sign in to comment.