From 29e79eb9bb55b1d1846c7e141e0b1ec3ea5319f3 Mon Sep 17 00:00:00 2001 From: gillespi314 <73313222+gillespi314@users.noreply.github.com> Date: Fri, 1 Oct 2021 19:34:31 -0500 Subject: [PATCH] Fix show refetch loading spinner (#2324) --- frontend/pages/hosts/HostDetailsPage/HostDetailsPage.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/pages/hosts/HostDetailsPage/HostDetailsPage.tsx b/frontend/pages/hosts/HostDetailsPage/HostDetailsPage.tsx index d3bda5934b..983ef98747 100644 --- a/frontend/pages/hosts/HostDetailsPage/HostDetailsPage.tsx +++ b/frontend/pages/hosts/HostDetailsPage/HostDetailsPage.tsx @@ -227,14 +227,14 @@ const HostDetailsPage = ({ const onRefetchHost = async () => { if (host) { + // Once the user clicks to refetch, the refetch loading spinner should continue spinning + // unless there is an error or until the user refreshes the page. setShowRefetchLoadingSpinner(true); try { await hostAPI.refetch(host); } catch (error) { console.log(error); dispatch(renderFlash("error", `Host "${host.hostname}" refetch error`)); - } finally { - setShowRefetchLoadingSpinner(false); } } };