From 59cc185122daa1fac708d7226be4514694103d82 Mon Sep 17 00:00:00 2001 From: v-lerie Date: Wed, 16 Jul 2025 21:58:48 -0400 Subject: [PATCH 1/2] Made "County name" a searchable component using input.geography.countyName on US site --- src/pages/household/VariableSearch.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pages/household/VariableSearch.jsx b/src/pages/household/VariableSearch.jsx index 22b522255..9001c3dde 100644 --- a/src/pages/household/VariableSearch.jsx +++ b/src/pages/household/VariableSearch.jsx @@ -4,6 +4,7 @@ import SearchOptions from "../../controls/SearchOptions"; export default function VariableSearch(props) { const { metadata, callback } = props; + const countryId = window.location.pathname.split("/")[1]; const [searchParams, setSearchParams] = useSearchParams(); const showComputed = searchParams.get("showComputedVariables") === "true"; const options = Object.values(metadata.variables) @@ -14,8 +15,11 @@ export default function VariableSearch(props) { label: variable.label, })) .filter((option) => !!option.label && !!option.value); + options.push({ - value: "input.household.countyName", + value: countryId === "us" + ? "input.geography.countyName" + : "input.household.countyName", label: "County name", }); return ( From de133f078a5b89ab66be8760cde5e8d850c5cf42 Mon Sep 17 00:00:00 2001 From: v-lerie Date: Wed, 16 Jul 2025 22:05:24 -0400 Subject: [PATCH 2/2] Made "County name" a searchable component using input.geography.countyName on US site --- src/pages/household/VariableSearch.jsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/pages/household/VariableSearch.jsx b/src/pages/household/VariableSearch.jsx index 9001c3dde..fbe946e74 100644 --- a/src/pages/household/VariableSearch.jsx +++ b/src/pages/household/VariableSearch.jsx @@ -15,11 +15,12 @@ export default function VariableSearch(props) { label: variable.label, })) .filter((option) => !!option.label && !!option.value); - + options.push({ - value: countryId === "us" - ? "input.geography.countyName" - : "input.household.countyName", + value: + countryId === "us" + ? "input.geography.countyName" + : "input.household.countyName", label: "County name", }); return (