File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed
packages/toolbar/src/core/ui/Toolbar/components/new/Settings Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -7,10 +7,12 @@ export function EnvironmentSelector() {
77 const { environments, loading } = useProjectContext ( ) ;
88
99 const environmentOptions = useMemo ( ( ) => {
10- return environments . map ( ( env ) => ( {
11- id : env . key ,
12- label : env . name ,
13- } ) ) ;
10+ return environments
11+ . map ( ( env ) => ( {
12+ id : env . key ,
13+ label : env . name ,
14+ } ) )
15+ . sort ( ( a , b ) => a . label . localeCompare ( b . label ) ) ;
1416 } , [ environments ] ) ;
1517
1618 const handleEnvironmentSelect = ( key : string | null ) => {
Original file line number Diff line number Diff line change @@ -14,10 +14,12 @@ export function ProjectSelector() {
1414 } , [ projects , getProjects ] ) ;
1515
1616 const projectOptions = useMemo ( ( ) => {
17- return projects . map ( ( project ) => ( {
18- id : project . key ,
19- label : project . name ,
20- } ) ) ;
17+ return projects
18+ . map ( ( project ) => ( {
19+ id : project . key ,
20+ label : project . name ,
21+ } ) )
22+ . sort ( ( a , b ) => a . label . localeCompare ( b . label ) ) ;
2123 } , [ projects ] ) ;
2224
2325 const handleProjectSelect = ( key : string | null ) => {
You can’t perform that action at this time.
0 commit comments