From 281daae1dadfb5afe60367933f2fff163fe2fbde Mon Sep 17 00:00:00 2001 From: Thibaud Dauce Date: Thu, 26 Feb 2026 15:10:24 +0100 Subject: [PATCH] fix: stable sort select width in search --- .../src/components/Search/GlobalSearch.vue | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) 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