Skip to content

Commit

Permalink
[ML] Sorting model list type dropdown (#132695)
Browse files Browse the repository at this point in the history
* [ML] Sorting model list type dropdown

* moving sort before map
  • Loading branch information
jgowdyelastic authored May 23, 2022
1 parent c25b2bc commit 907b2e4
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,12 @@ export const ModelsList: FC<Props> = ({
acc.add(item.model_type);
return acc;
}, new Set<string>());
return [...result].map((v) => ({
value: v,
name: v,
}));
return [...result]
.sort((a, b) => a.localeCompare(b))
.map((v) => ({
value: v,
name: v,
}));
}, [items]);

/**
Expand Down

0 comments on commit 907b2e4

Please sign in to comment.