From 98a9ca359dea1e76f761d908e9d6812e8a1a041c Mon Sep 17 00:00:00 2001
From: Andy Chan <andy@12beesinatrenchco.at>
Date: Tue, 12 Nov 2024 18:09:51 -0500
Subject: [PATCH] Move ref in FilterPill to allow closing by clicking pill

Clicking on the pill would reopen the dropdown; it closes properly now
---
 compass/components/resource/LandingSearchBar.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compass/components/resource/LandingSearchBar.tsx b/compass/components/resource/LandingSearchBar.tsx
index 7331d41..399a71d 100644
--- a/compass/components/resource/LandingSearchBar.tsx
+++ b/compass/components/resource/LandingSearchBar.tsx
@@ -218,6 +218,7 @@ const FilterPill: React.FC<FilterPillProps> = ({
 
     return (
         <div
+            ref={dropdownRef}
             className={
                 "border rounded-2xl w-max px-2 py-0.5 text-sm mr-2 relative " +
                 (isActive
@@ -248,7 +249,6 @@ const FilterPill: React.FC<FilterPillProps> = ({
 
             {/* The filter option selection dropdown */}
             <div
-                ref={dropdownRef}
                 className={
                     "absolute top-full mt-0.5 left-0 border border-gray-200 bg-white shadow-lg rounded-md p-1.5 w-48 " +
                     (showDropdown ? "flex flex-col" : "hidden")