mirror of
https://github.com/lemeow125/Borrowing-TrackerFrontend.git
synced 2024-11-17 06:19:27 +08:00
Sort available equipments by id in ascending order
This commit is contained in:
parent
a685e3fcb5
commit
8810daa26c
1 changed files with 1 additions and 1 deletions
|
@ -138,7 +138,7 @@ export default function AddTransactionPage() {
|
||||||
<Autocomplete
|
<Autocomplete
|
||||||
multiple
|
multiple
|
||||||
id="equipment-autocomplete"
|
id="equipment-autocomplete"
|
||||||
options={equipments.data || []}
|
options={equipments.data?.sort((a, b) => a.id - b.id) || []}
|
||||||
getOptionLabel={(option) =>
|
getOptionLabel={(option) =>
|
||||||
`${option.equipment_name} (ID:${option.id})`
|
`${option.equipment_name} (ID:${option.id})`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue