From 6f45fa7cde5bdbd72fea81802bedd9179b52ae5e Mon Sep 17 00:00:00 2001 From: JithishKumarG Date: Thu, 2 Oct 2025 17:30:05 +0530 Subject: [PATCH] Consumer search criteria not cleared/used when navigating to another consumer - fixed The search text will be cleared when switched to different cluster's consumers --- frontend/src/components/common/Search/Search.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/common/Search/Search.tsx b/frontend/src/components/common/Search/Search.tsx index 8139895bb..b6699bad5 100644 --- a/frontend/src/components/common/Search/Search.tsx +++ b/frontend/src/components/common/Search/Search.tsx @@ -32,10 +32,11 @@ const Search: React.FC = ({ const ref = useRef>(null); useEffect(() => { - if (ref.current !== null && value) { - ref.current.value = value; + const qParam = searchParams.get('q') || ''; + if (ref.current !== null) { + ref.current.value = qParam; } - }, [value]); + }, [searchParams]); const handleChange = useDebouncedCallback((e) => { if (ref.current != null) {