From 11337f15419bdff22fec62194cbe80a30f98c8b1 Mon Sep 17 00:00:00 2001 From: Rafal Date: Thu, 21 Dec 2023 04:56:07 +0100 Subject: [PATCH] fix(ui): Reoreding filters (#44) * fix(ui): Reoreding filters * fix --- .../components/applications-list/applications-filter.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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}; });