Skip to content

Commit

Permalink
Merge master into dependabot/npm_and_yarn/examples/micromatch-4.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
cognite-bulldozer[bot] authored Sep 6, 2024
2 parents fc41b9f + 3bbb849 commit e916d41
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 5 deletions.
7 changes: 6 additions & 1 deletion react-components/src/query/use3dRelatedDirectConnections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ export function use3dRelatedDirectConnections(
const fdmDataProvider = useFdm3dDataProvider();

return useQuery({
queryKey: ['reveal-react-components', 'get-3d-related-direct-connections'],
queryKey: [
'reveal-react-components',
'get-3d-related-direct-connections',
instance?.externalId,
instance?.space
],
queryFn: async () => {
assert(instance !== undefined);
const views = await fdmSdk.inspectInstances({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ export const useAllAssetsMapped360Annotations = (
image360AnnotationFilterOptions: Image360AnnotationFilterOptions = { status: `approved` }
): UseQueryResult<Image360AnnotationMappedAssetData[]> => {
return useQuery({
queryKey: ['reveal', 'react-components', 'all-assets-mapped-360-annotations', siteIds],
queryKey: [
'reveal',
'react-components',
'all-assets-mapped-360-annotations',
siteIds,
image360AnnotationFilterOptions.status
],
queryFn: async () => {
const assetMappings = await getAssetsMapped360Annotations(
sdk,
Expand Down Expand Up @@ -54,7 +60,8 @@ export const useSearchAssetsMapped360Annotations = (
'react-components',
'search-assets-mapped-360-annotations',
query,
siteIds
siteIds,
image360AnnotationFilterOptions?.status
],
queryFn: async () => {
if (query === '') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export const useSearchMappedEquipmentAssetMappings = (
'react-components',
'search-mapped-asset-mappings',
query,
limit,
...models.map((model) => [model.modelId, model.revisionId])
],
queryFn: async ({ pageParam }: { pageParam: string | undefined }) => {
Expand Down Expand Up @@ -123,6 +124,7 @@ export const useAllMappedEquipmentAssetMappings = (
'reveal',
'react-components',
'all-mapped-equipment-asset-mappings',
limit,
...models.map((model) => [model.modelId, model.revisionId])
],
queryFn: async ({ pageParam }) => {
Expand Down
13 changes: 11 additions & 2 deletions react-components/src/query/useSearchMappedEquipmentFDM.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,16 @@ export const useSearchMappedEquipmentFDM = (
);

return useQuery({
queryKey: ['reveal', 'react-components', 'search-mapped-fdm', query, models, viewsToSearch],
queryKey: [
'reveal',
'react-components',
'search-mapped-fdm',
query,
models,
viewsToSearch,
instancesFilter,
limit
],
queryFn: async () => {
if (models.length === 0) {
return [];
Expand Down Expand Up @@ -123,7 +132,7 @@ export const useAllMappedEquipmentFDM = (
const fdmDataProvider = useFdm3dDataProvider();

return useQuery({
queryKey: ['reveal', 'react-components', 'all-mapped-equipment-fdm', viewsToSearch],
queryKey: ['reveal', 'react-components', 'all-mapped-equipment-fdm', viewsToSearch, models],
queryFn: async () => {
const viewSources = await createSourcesFromViews(viewsToSearch, fdmSdk);

Expand Down

0 comments on commit e916d41

Please sign in to comment.