From b013a71ea6407139da65d9f8cd26601ca14dd906 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 23 Dec 2025 20:05:32 -0500 Subject: [PATCH] Feature: Add clear button and fix dropdown z-index MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes: 1. Added clear (X) button in search bar - Only appears when there's text - Clears search query AND filters - Clean X icon with hover effect 2. Fixed dropdown z-index - Changed from z-index: 50 to z-index: 9999 - Now appears above all other UI elements 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- src/components/Search/SmartSearchBar.jsx | 21 +++++++++++++++++++++ src/styles/smartSearchBar.css | 23 ++++++++++++++++++++++- 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/src/components/Search/SmartSearchBar.jsx b/src/components/Search/SmartSearchBar.jsx index 43ad552..5d2b920 100644 --- a/src/components/Search/SmartSearchBar.jsx +++ b/src/components/Search/SmartSearchBar.jsx @@ -165,6 +165,13 @@ export default function SmartSearchBar({ return "Place / Tour / Wire"; }, []); + const handleClear = () => { + setQ(""); + setItems([]); + setOpen(false); + onSearch && onSearch(""); // Clear filters + }; + return (
@@ -184,6 +191,20 @@ export default function SmartSearchBar({ aria-label="Search" /> + {q && ( + + )} +