From 41b2b9ceb13f20943844fcdfd041c82a92b81751 Mon Sep 17 00:00:00 2001
From: Jacob Cain <jrcain@usgs.gov>
Date: Wed, 22 Nov 2023 16:26:12 -0800
Subject: [PATCH] Reset show properties box

---
 src/components/presentational/SearchAndFilterInput.jsx | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/components/presentational/SearchAndFilterInput.jsx b/src/components/presentational/SearchAndFilterInput.jsx
index 9f2a7dd63..828d2db5d 100644
--- a/src/components/presentational/SearchAndFilterInput.jsx
+++ b/src/components/presentational/SearchAndFilterInput.jsx
@@ -236,6 +236,11 @@ export default function SearchAndFilterInput(props) {
     return () => window.removeEventListener("message", onBoxDraw);
   }, []);
 
+  // If Available queriables are changed, reset the ones selected to none
+  useEffect(() => {
+    setSelectedOptions([]);
+  }, [props.availableQueriables]);
+
   // If target is changed, reset filter values;
   useEffect(() => {
 
-- 
GitLab