diff --git a/plugins/techdocs/src/reader/components/TechDocsSearch.tsx b/plugins/techdocs/src/reader/components/TechDocsSearch.tsx index e45a26675b..6c0be16f4f 100644 --- a/plugins/techdocs/src/reader/components/TechDocsSearch.tsx +++ b/plugins/techdocs/src/reader/components/TechDocsSearch.tsx @@ -90,14 +90,17 @@ const TechDocsSearchBar = ({ // Update the filter context when the entityId changes, e.g. when the search // bar continues to be rendered, navigating between different TechDocs sites. + const { kind, name, namespace } = entityId; useEffect(() => { setFilters(prevFilters => { return { ...prevFilters, - ...entityId, + kind, + namespace, + name, }; }); - }, [entityId, setFilters]); + }, [kind, namespace, name, setFilters]); const handleQuery = (e: ChangeEvent) => { if (!open) {