diff --git a/src/bundle/ui-dev/src/modules/universal-discovery/hooks/useFindLocationsByParentLocationIdFetch.js b/src/bundle/ui-dev/src/modules/universal-discovery/hooks/useFindLocationsByParentLocationIdFetch.js index 3695303f23..de1e355e15 100644 --- a/src/bundle/ui-dev/src/modules/universal-discovery/hooks/useFindLocationsByParentLocationIdFetch.js +++ b/src/bundle/ui-dev/src/modules/universal-discovery/hooks/useFindLocationsByParentLocationIdFetch.js @@ -52,8 +52,6 @@ export const useFindLocationsByParentLocationIdFetch = (locationData, { sortClau { ...restInfo, parentLocationId: locationData.parentLocationId, - limit, - offset, }, resolve, ); diff --git a/src/bundle/ui-dev/src/modules/universal-discovery/services/universal.discovery.service.js b/src/bundle/ui-dev/src/modules/universal-discovery/services/universal.discovery.service.js index 3bb4926bc2..991943eb48 100644 --- a/src/bundle/ui-dev/src/modules/universal-discovery/services/universal.discovery.service.js +++ b/src/bundle/ui-dev/src/modules/universal-discovery/services/universal.discovery.service.js @@ -508,16 +508,15 @@ export const fetchAdminConfig = async ({ token, siteaccess, accessToken, instanc return adminUiConfig.ApplicationConfig; }; -export const findSuggestions = ( - { siteaccess, token, parentLocationId, accessToken, instanceUrl = DEFAULT_INSTANCE_URL, limit = QUERY_LIMIT, offset = 0 }, - callback, -) => { +export const findSuggestions = ({ siteaccess, token, parentLocationId, accessToken, instanceUrl = DEFAULT_INSTANCE_URL }, callback) => { const body = { ViewInput: { identifier: 'view_with_aggregation', LocationQuery: { - limit, - offset, + // '0' is a proper choice here because aggregation will still provide proper results. + // We care only about the aggregation itself, not about fetching records. + limit: 0, + offset: 0, Filter: { ParentLocationIdCriterion: parentLocationId, },