diff --git a/ui/src/app/applications/components/applications-list/applications-filter.tsx b/ui/src/app/applications/components/applications-list/applications-filter.tsx index 9c62403c0d430..872fe63dea017 100644 --- a/ui/src/app/applications/components/applications-list/applications-filter.tsx +++ b/ui/src/app/applications/components/applications-list/applications-filter.tsx @@ -9,6 +9,7 @@ import {ComparisonStatusIcon, HealthStatusIcon} from '../utils'; const optionsFrom = (options: string[], filter: string[]) => { return options .filter(s => filter.indexOf(s) === -1) + .sort((a, b) => a.localeCompare(b)) .map(item => { return {label: item}; }); @@ -60,7 +61,7 @@ const LabelsFilter = (props: AppFilterProps) => { suggestions.push(labelStats.key); labelStats.values.forEach(val => suggestions.push(`${labelStats.key}=${val}`)); }); - const labelOptions = suggestions.map(s => { + const labelOptions = suggestions.sort((a, b) => a.localeCompare(b)).map(s => { return {label: s}; });