From fdd2c1c59ede444944cd13d0acff06f1ad9fccf2 Mon Sep 17 00:00:00 2001 From: Levente Balogh Date: Tue, 5 Mar 2024 14:23:29 +0100 Subject: [PATCH] Plugins Catalog: Fix plugin details page initial flickering (#83896) fix: wait for the local and remote fetches to fulfill --- public/app/features/plugins/admin/state/hooks.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/app/features/plugins/admin/state/hooks.ts b/public/app/features/plugins/admin/state/hooks.ts index f6592a9e128..c50d9548348 100644 --- a/public/app/features/plugins/admin/state/hooks.ts +++ b/public/app/features/plugins/admin/state/hooks.ts @@ -84,7 +84,10 @@ export const useLocalFetchStatus = () => { }; export const useFetchStatus = () => { - const isLoading = useSelector(selectIsRequestPending(fetchAll.typePrefix)); + const isAllLoading = useSelector(selectIsRequestPending(fetchAll.typePrefix)); + const isLocalLoading = useSelector(selectIsRequestPending('plugins/fetchLocal')); + const isRemoteLoading = useSelector(selectIsRequestPending('plugins/fetchRemote')); + const isLoading = isAllLoading || isLocalLoading || isRemoteLoading; const error = useSelector(selectRequestError(fetchAll.typePrefix)); return { isLoading, error };