diff --git a/desktop/flipper-plugin/src/ui/PowerSearch/index.tsx b/desktop/flipper-plugin/src/ui/PowerSearch/index.tsx index 38108fe6c..4904af564 100644 --- a/desktop/flipper-plugin/src/ui/PowerSearch/index.tsx +++ b/desktop/flipper-plugin/src/ui/PowerSearch/index.tsx @@ -71,6 +71,11 @@ export const PowerSearch: React.FC = ({config}) => { ? searchExpression[searchExpression.length - 1].searchValue !== undefined : false; + const searchTermFinderRef = React.useRef<{ + focus: () => void; + blur: () => void; + scrollTo: () => void; + }>(null); const [searchTermFinderValue, setSearchTermFinderValue] = React.useState< string | null >(null); @@ -114,6 +119,7 @@ export const PowerSearch: React.FC = ({config}) => { }, ]; }); + searchTermFinderRef.current?.focus(); }} onKeyDown={(event) => { if (event.key === 'Enter' || event.key === 'Escape') { @@ -141,6 +147,7 @@ export const PowerSearch: React.FC = ({config}) => { })} + ref={searchTermFinderRef} style={{flex: '1'}} options={options} bordered={false}