diff --git a/.changeset/slimy-fans-raise.md b/.changeset/slimy-fans-raise.md
new file mode 100644
index 0000000000..782ef4bc82
--- /dev/null
+++ b/.changeset/slimy-fans-raise.md
@@ -0,0 +1,5 @@
+---
+'@backstage/plugin-techdocs': patch
+---
+
+Fix weird opening behaviour of the component.
diff --git a/plugins/techdocs/src/search/components/TechDocsSearch.tsx b/plugins/techdocs/src/search/components/TechDocsSearch.tsx
index 665f99c1bb..ce77d547db 100644
--- a/plugins/techdocs/src/search/components/TechDocsSearch.tsx
+++ b/plugins/techdocs/src/search/components/TechDocsSearch.tsx
@@ -63,6 +63,7 @@ const TechDocsSearchBar = (props: TechDocsSearchProps) => {
const navigate = useNavigate();
const {
setFilters,
+ term,
result: { loading, value: searchVal },
} = useSearch();
const [options, setOptions] = useState([]);
@@ -109,7 +110,7 @@ const TechDocsSearchBar = (props: TechDocsSearchProps) => {
''}
filterOptions={x => {
return x; // This is needed to get renderOption to be called after options change. Bug in material-ui?
@@ -117,7 +118,7 @@ const TechDocsSearchBar = (props: TechDocsSearchProps) => {
onClose={() => {
setOpen(false);
}}
- onFocus={() => {
+ onOpen={() => {
setOpen(true);
}}
onChange={handleSelection}