Skip to content

Commit d80b601

Browse files
committed
close listing geocoder results
1 parent c4c2d85 commit d80b601

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

e2e/listings.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ test("listing location search picks a geocoding result", async ({ page }) => {
115115
.toBeGreaterThanOrEqual(16);
116116
await page.getByRole("option", { name: /Newtown/ }).click();
117117

118+
await expect(page.getByRole("option", { name: /Newtown/ })).toHaveCount(0);
118119
await expect(searchInput).toHaveValue("Newtown");
119120
await expect(page.locator(".maplibregl-canvas")).toBeVisible({
120121
timeout: 10_000,

src/features/map/components/GeocodingSearch.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -258,12 +258,7 @@ const GeocodingSearch = forwardRef<GeocodingSearchHandle, GeocodingSearchProps>(
258258
});
259259
const hasSearchableQuery = query.trim().length >= 3;
260260
const showResults =
261-
hasSearchableQuery &&
262-
(variant === "palette" ||
263-
isFocused ||
264-
isLoading ||
265-
isError ||
266-
features.length > 0);
261+
hasSearchableQuery && (variant === "palette" || isFocused);
267262
const showNoResults =
268263
showResults && isReady && !isLoading && !isError && features.length === 0;
269264
const statusMessage = isLoading

0 commit comments

Comments
 (0)