From 8ed7b945e039c861f20648a48f5ade2358ac4f2f Mon Sep 17 00:00:00 2001 From: Pramod S Date: Tue, 20 Aug 2024 09:27:15 +0200 Subject: [PATCH] renamed asset mapping node fetch variable --- .../src/query/useSearchMappedEquipmentAssetMappings.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/react-components/src/query/useSearchMappedEquipmentAssetMappings.tsx b/react-components/src/query/useSearchMappedEquipmentAssetMappings.tsx index dda094ff1a4..374b50a67ff 100644 --- a/react-components/src/query/useSearchMappedEquipmentAssetMappings.tsx +++ b/react-components/src/query/useSearchMappedEquipmentAssetMappings.tsx @@ -46,9 +46,8 @@ export const useSearchMappedEquipmentAssetMappings = ( userSdk?: CogniteClient ): UseInfiniteQueryResult, Error> => { const sdk = useSDK(userSdk); - const { data: assetMappingList, isFetched } = useAssetMappedNodesForRevisions( - models.map((model) => ({ ...model, type: 'cad' })) - ); + const { data: assetMappingList, isFetched: isAssetMappingNodesFetched } = + useAssetMappedNodesForRevisions(models.map((model) => ({ ...model, type: 'cad' }))); const { data: initialAssetMappings, isLoading: isInitialAssetMappingsLoading } = useAllMappedEquipmentAssetMappings(models, sdk); @@ -103,7 +102,7 @@ export const useSearchMappedEquipmentAssetMappings = ( }, enabled: !isInitialAssetMappingsLoading && - isFetched && + isAssetMappingNodesFetched && assetMappingList !== undefined && assetMappingList.length > 0 });