From ee7ea7780163e87747c9bf31e5b57f7741eaa2a1 Mon Sep 17 00:00:00 2001 From: Graeme Christie Date: Thu, 22 Feb 2024 15:29:00 +0800 Subject: [PATCH] Modified azure table to only show loading UI on initial load Sorted tags in table is thier order from the api is indeterminate, and they would randomly shuffle on each load Signed-off-by: Graeme Christie --- .../AzureSitesOverviewTable.tsx | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/plugins/azure-sites/src/components/AzureSitesOverviewTableComponent/AzureSitesOverviewTable.tsx b/plugins/azure-sites/src/components/AzureSitesOverviewTableComponent/AzureSitesOverviewTable.tsx index 2f891ec3d2..751a61a3e1 100644 --- a/plugins/azure-sites/src/components/AzureSitesOverviewTableComponent/AzureSitesOverviewTable.tsx +++ b/plugins/azure-sites/src/components/AzureSitesOverviewTableComponent/AzureSitesOverviewTable.tsx @@ -99,15 +99,17 @@ const Kind = ({ value }: { value: Kinds }) => { }; const Tags = ({ tags }: { tags: any }) => { - return Object.keys(tags).map((key: any) => ( - - )); + return Object.keys(tags) + .toSorted() + .map((key: any) => ( + + )); }; type TableProps = { @@ -291,7 +293,7 @@ export const AzureSitesOverviewTable = ({ data, loading }: TableProps) => { options={{ paging: true, search: false, pageSize: 10 }} data={data} emptyContent={} - isLoading={loading} + isLoading={loading && data.length === 0} columns={columns} />