diff --git a/ui/src/app/applications/components/applications-list/applications-list.tsx b/ui/src/app/applications/components/applications-list/applications-list.tsx index 6e1e727dbc..f6911ec6e7 100644 --- a/ui/src/app/applications/components/applications-list/applications-list.tsx +++ b/ui/src/app/applications/components/applications-list/applications-list.tsx @@ -165,6 +165,19 @@ export const ApplicationsList = (props: RouteComponentProps<{}>) => { const [isAppCreatePending, setAppCreatePending] = React.useState(false); const searchBar = React.useRef(null); + React.useEffect(() => { + const handleKeyPress = (e: KeyboardEvent) => { + if (e.keyCode === 47 && searchBar.current && !appInput) { + searchBar.current.querySelector('input').focus(); + e.preventDefault(); + } + }; + document.addEventListener('keypress', handleKeyPress); + return () => { + document.removeEventListener('keypress', handleKeyPress); + }; + }); + const loaderRef = React.useRef(); function refreshApp(appName: string) { // app refreshing might be done too quickly so that UI might miss it due to event batching