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 });