diff --git a/datagouv-components/src/components/Search/GlobalSearch.vue b/datagouv-components/src/components/Search/GlobalSearch.vue index c5c405fa6..81ec5f871 100644 --- a/datagouv-components/src/components/Search/GlobalSearch.vue +++ b/datagouv-components/src/components/Search/GlobalSearch.vue @@ -195,9 +195,11 @@ {{ t('Pertinence') }} @@ -333,7 +335,7 @@ import type { Dataset } from '../../types/datasets' import type { Dataservice } from '../../types/dataservices' import type { Organization } from '../../types/organizations' import type { Reuse } from '../../types/reuses' -import type { GlobalSearchConfig, SearchType, DatasetSearchResponse, DataserviceSearchResponse, ReuseSearchResponse, OrganizationSearchResponse, FacetItem } from '../../types/search' +import type { GlobalSearchConfig, SearchType, SortOption, DatasetSearchResponse, DataserviceSearchResponse, ReuseSearchResponse, OrganizationSearchResponse, FacetItem } from '../../types/search' import { getDefaultGlobalSearchConfig } from '../../types/search' import BrandedButton from '../BrandedButton.vue' import LoadingBlock from '../LoadingBlock.vue' @@ -396,6 +398,22 @@ const activeSortOptions = computed(() => currentTypeConfig.value?.sortOptions ?? [], ) +const activeSortValues = computed(() => + new Set(activeSortOptions.value.map(o => o.value as string)), +) + +// Deduplicated union of all sort options across all search types. +// Rendered as hidden