diff --git a/.changeset/pretty-olives-travel.md b/.changeset/pretty-olives-travel.md new file mode 100644 index 0000000000..371f6e8e95 --- /dev/null +++ b/.changeset/pretty-olives-travel.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-azure-sites': patch +--- + +Modified azure table to only show loading UI on initial load. Sorted tags in table is their order from the api is indeterminate, and they would randomly shuffle on each load diff --git a/plugins/azure-sites/src/components/AzureSitesOverviewTableComponent/AzureSitesOverviewTable.tsx b/plugins/azure-sites/src/components/AzureSitesOverviewTableComponent/AzureSitesOverviewTable.tsx index 2f891ec3d2..c8afb1c6aa 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) + .sort() + .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} />