diff --git a/index.html b/index.html index df09188..9e64aee 100644 --- a/index.html +++ b/index.html @@ -23,8 +23,17 @@ - - + + + + + + SocioWire.com - Wired to life @@ -32,4 +41,4 @@
- \ No newline at end of file + diff --git a/src/components/Map/MapView.jsx b/src/components/Map/MapView.jsx index c6ea70a..45f34da 100644 --- a/src/components/Map/MapView.jsx +++ b/src/components/Map/MapView.jsx @@ -338,7 +338,9 @@ export default function MapView({ map.__swForceFetchAt = Date.now(); // If picking a post, clear filters and avoid query-locking - if (item.type === 'post') { + const kind = (item?.kind || item?.type || "").toString().toLowerCase(); + + if (kind === 'post') { skipAutoZoomRef.current = true; setSearchQuery(""); setMainFilter("All"); @@ -364,6 +366,10 @@ export default function MapView({ url_hash: raw.url_hash || "", }); } + } else if (kind === 'city') { + // City pick should move the map without forcing a text filter. + skipAutoZoomRef.current = false; + setSearchQuery(""); } else { const q = (item.title || item.name || "").toString().trim(); skipAutoZoomRef.current = false; diff --git a/src/components/Search/SmartSearchBar.jsx b/src/components/Search/SmartSearchBar.jsx index 938e72c..6c35139 100644 --- a/src/components/Search/SmartSearchBar.jsx +++ b/src/components/Search/SmartSearchBar.jsx @@ -158,11 +158,8 @@ export default function SmartSearchBar({ setActive((i) => Math.max(i - 1, 0)); } else if (e.key === "Enter") { e.preventDefault(); - if (items.length && active >= 0) { - // Pick the selected suggestion - pick(items[active], "enter"); - } else if (q.trim()) { - // No item selected, trigger search/filter + if (q.trim()) { + // Always filter on Enter; do not auto-pick dropdown items. skipSearchRef.current = true; setOpen(false); onSearch && onSearch(q.trim());