From 2410175513f72f45f25502d0fbe022f9656ab726 Mon Sep 17 00:00:00 2001 From: Mike Turley Date: Mon, 25 Sep 2023 12:50:08 -0400 Subject: [PATCH] :bug: Fix sorting on application inventory tables Signed-off-by: Mike Turley --- .../applications-table-analyze.tsx | 9 ++++++++- .../applications-table-assessment.tsx | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/client/src/app/pages/applications/applications-table-analyze/applications-table-analyze.tsx b/client/src/app/pages/applications/applications-table-analyze/applications-table-analyze.tsx index 37c81d2c77..eaa2b03bd1 100644 --- a/client/src/app/pages/applications/applications-table-analyze/applications-table-analyze.tsx +++ b/client/src/app/pages/applications/applications-table-analyze/applications-table-analyze.tsx @@ -198,6 +198,12 @@ export const ApplicationsTableAnalyze: React.FC = () => { }, sortableColumns: ["name", "description", "businessService", "tags"], initialSort: { columnKey: "name", direction: "asc" }, + getSortValues: (app) => ({ + name: app.name, + description: app.description || "", + businessService: app.businessService?.name || "", + tags: app.tags?.length || 0, + }), filterCategories: [ { key: "name", @@ -551,7 +557,7 @@ export const ApplicationsTableAnalyze: React.FC = () => { - +
@@ -560,6 +566,7 @@ export const ApplicationsTableAnalyze: React.FC = () => { diff --git a/client/src/app/pages/applications/applications-table-assessment/applications-table-assessment.tsx b/client/src/app/pages/applications/applications-table-assessment/applications-table-assessment.tsx index c9bfc6cbf7..f641c5ee29 100644 --- a/client/src/app/pages/applications/applications-table-assessment/applications-table-assessment.tsx +++ b/client/src/app/pages/applications/applications-table-assessment/applications-table-assessment.tsx @@ -244,6 +244,12 @@ export const ApplicationsTable: React.FC = () => { }, sortableColumns: ["name", "description", "businessService", "tags"], initialSort: { columnKey: "name", direction: "asc" }, + getSortValues: (app) => ({ + name: app.name, + description: app.description || "", + businessService: app.businessService?.name || "", + tags: app.tags?.length || 0, + }), filterCategories: [ { key: "name", @@ -576,7 +582,7 @@ export const ApplicationsTable: React.FC = () => { -
+
+
@@ -586,6 +592,7 @@ export const ApplicationsTable: React.FC = () => {
+