From d92b2ff9b230c1744899d86dec64af64ce8b7ebb Mon Sep 17 00:00:00 2001 From: Adam Antal Date: Fri, 10 Nov 2023 11:23:36 +0100 Subject: [PATCH] Only reset initial CQL in cql search header form if value changes This was causing problems when the user wanted to write something more in the text field, but upon searching, the query didn't update. --- src/apps/advanced-search/CqlSearchHeader.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/advanced-search/CqlSearchHeader.tsx b/src/apps/advanced-search/CqlSearchHeader.tsx index bbd9f51f88..4cf9f1780a 100644 --- a/src/apps/advanced-search/CqlSearchHeader.tsx +++ b/src/apps/advanced-search/CqlSearchHeader.tsx @@ -18,7 +18,7 @@ const CqlSearchHeader: React.FC = ({ if (initialCql.trim() !== "") { setCql(initialCql); } - }); + }, [initialCql, setCql]); return ( <>