Skip to content

Commit

Permalink
Merge Sort formation fields by id #273
Browse files Browse the repository at this point in the history
  • Loading branch information
MiraGeowerkstatt authored Aug 9, 2022
2 parents b061781 + e926bd4 commit 754b628
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/ClientApp/src/components/BohrprofilForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ export default function BohrprofilForm(props) {
<Autocomplete
{...field}
sx={{ width: "47%" }}
options={formationFelsCodes.sort((a, b) => a.kurztext.localeCompare(b.kurztext)).map((c) => c.id)}
options={formationFelsCodes.map((c) => c.id).sort((a, b) => a - b)}
value={field.value}
getOptionLabel={(option) => formationFelsCodes.find((c) => c.id === option)?.kurztext}
onChange={(_, data) => field.onChange(data)}
Expand All @@ -374,9 +374,7 @@ export default function BohrprofilForm(props) {
<Autocomplete
{...field}
sx={{ marginRight: "6%", width: "47%" }}
options={formationEndtiefeCodes
.sort((a, b) => a.kurztext.localeCompare(b.kurztext))
.map((c) => c.id)}
options={formationEndtiefeCodes.map((c) => c.id).sort((a, b) => a - b)}
value={field.value}
getOptionLabel={(option) => formationEndtiefeCodes.find((c) => c.id === option)?.kurztext}
onChange={(_, data) => field.onChange(data)}
Expand Down

0 comments on commit 754b628

Please sign in to comment.