Fix handling of search term when performing searches from the sidebar

Signed-off-by: Johan Hammar <johan.hammar@gmail.com>
This commit is contained in:
Johan Hammar
2021-10-01 17:20:09 +02:00
parent 87ba323768
commit 53470ada54
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core-components': patch
---
Fix search in Firefox. When the search was performed by pressing enter, the query parameter was first set but then reverted back.
@@ -311,6 +311,7 @@ export function SidebarSearchField(props: SidebarSearchFieldProps) {
const handleEnter: KeyboardEventHandler = ev => {
if (ev.key === 'Enter') {
search();
ev.preventDefault();
}
};