diff --git a/components/resource_management/helpers/refetch_resource_list.spec.ts b/components/resource_management/helpers/refetch_resource_list.spec.ts index 2bddb0b37..73a937005 100644 --- a/components/resource_management/helpers/refetch_resource_list.spec.ts +++ b/components/resource_management/helpers/refetch_resource_list.spec.ts @@ -3,6 +3,7 @@ import helper from "./refetch_resource_list" describe("Helper: resource management/resource list resetter", () => { it("can clear resource list data and meta count", () => { + const isLoaded = ref(true) const resourceListData = [ 1, 2, 3 ] const sampleResourceList = ref({ "data": resourceListData, @@ -16,6 +17,7 @@ describe("Helper: resource management/resource list resetter", () => { async function sampleFetchMethod(): Promise {} helper( + isLoaded, sampleResourceList as Ref, sampleErrors, sampleIDs, diff --git a/components/resource_management/helpers/refetch_resource_list.ts b/components/resource_management/helpers/refetch_resource_list.ts index 281ef24c5..7f0ebab3d 100644 --- a/components/resource_management/helpers/refetch_resource_list.ts +++ b/components/resource_management/helpers/refetch_resource_list.ts @@ -15,11 +15,13 @@ export default async function< V extends DeserializedResource, W extends DeserializedResourceListDocument >( + isLoaded: Ref, list: Ref, receivedErrors: Ref, selectedIDs: Ref, fetchResourceInfo: () => Promise ) { + isLoaded.value = false list.value = { ...list.value, "data": [],