mirror of
https://github.com/lemeow125/Borrowing-TrackerFrontend.git
synced 2024-11-16 22:09:29 +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
|
||||
multiple
|
||||
id="equipment-autocomplete"
|
||||
options={equipments.data || []}
|
||||
options={equipments.data?.sort((a, b) => a.id - b.id) || []}
|
||||
getOptionLabel={(option) =>
|
||||
`${option.equipment_name} (ID:${option.id})`
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue