@datagouv/components-next 1.0.2-dev.87 → 1.0.2-dev.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Datafair.client-CGDQWFP2.js → Datafair.client-o29pT5IO.js} +1 -1
- package/dist/{JsonPreview.client-CRAjVwYR.js → JsonPreview.client-zTm_P1pn.js} +2 -2
- package/dist/{MapContainer.client-gmUC2Cl5.js → MapContainer.client-Cre2ITH4.js} +2 -2
- package/dist/{PdfPreview.client-CRIHPiVa.js → PdfPreview.client-CrCTrCMW.js} +2 -2
- package/dist/{Pmtiles.client-DHyaqRB7.js → Pmtiles.client-Bk3YXxir.js} +1 -1
- package/dist/{PreviewWrapper.vue_vue_type_script_setup_true_lang-BFIK58nF.js → PreviewWrapper.vue_vue_type_script_setup_true_lang-i2mxfv14.js} +1 -1
- package/dist/{XmlPreview.client-D2pj4Pi-.js → XmlPreview.client-DvVfyOrX.js} +3 -3
- package/dist/components-next.js +1 -1
- package/dist/{index-BihEb_eg.js → index-Bz10NPKw.js} +1 -1
- package/dist/{main-BNyfhPgX.js → main-DWYesZBr.js} +5727 -5727
- package/dist/{vue3-xml-viewer.common-MxH3AoAS.js → vue3-xml-viewer.common-CgoYvikm.js} +1 -1
- package/package.json +1 -1
- package/src/components/Search/GlobalSearch.vue +8 -3
package/package.json
CHANGED
|
@@ -475,6 +475,11 @@ const showSidebar = computed(() => props.config.length > 1 || activeFilters.valu
|
|
|
475
475
|
// URL query params
|
|
476
476
|
const q = useRouteQuery<string>('q', '')
|
|
477
477
|
const { debounced: qDebounced, flush: flushQ } = useDebouncedRef(q, componentsConfig.searchDebounce ?? 300)
|
|
478
|
+
// When the search input is hidden, the parent owns the input and is expected
|
|
479
|
+
// to debounce user typing itself (otherwise typing would land in the URL
|
|
480
|
+
// instantly via v-model and stack two debounces). Bypass the internal debounce
|
|
481
|
+
// so URL-driven q changes hit the fetch params immediately.
|
|
482
|
+
const qForParams = computed(() => props.hideSearchInput ? q.value : qDebounced.value)
|
|
478
483
|
const page = useRouteQuery('page', 1, { transform: Number })
|
|
479
484
|
const sort = useRouteQuery<string | undefined>('sort')
|
|
480
485
|
|
|
@@ -550,7 +555,7 @@ watch(currentType, () => {
|
|
|
550
555
|
const stableParamsOptions = {
|
|
551
556
|
allFilters,
|
|
552
557
|
customFilterRegistry,
|
|
553
|
-
q:
|
|
558
|
+
q: qForParams,
|
|
554
559
|
sort,
|
|
555
560
|
page,
|
|
556
561
|
pageSize,
|
|
@@ -643,7 +648,7 @@ for (const c of props.config) {
|
|
|
643
648
|
// intentionally excluded here to avoid resetting the page when a filter
|
|
644
649
|
// registers with its URL-derived value.
|
|
645
650
|
const filtersForReset = computed(() => ({
|
|
646
|
-
q:
|
|
651
|
+
q: qForParams.value,
|
|
647
652
|
organization: organizationId.value,
|
|
648
653
|
organization_badge: organizationType.value,
|
|
649
654
|
tag: tag.value,
|
|
@@ -726,7 +731,7 @@ const rssUrl = computed(() => {
|
|
|
726
731
|
}
|
|
727
732
|
|
|
728
733
|
// Add active filters
|
|
729
|
-
if (
|
|
734
|
+
if (qForParams.value) params.set('q', qForParams.value)
|
|
730
735
|
if (organizationId.value) params.set('organization', organizationId.value)
|
|
731
736
|
if (organizationType.value) params.set('organization_badge', organizationType.value)
|
|
732
737
|
if (tag.value) params.set('tag', tag.value)
|