diff --git a/desktop/flipper-plugin/src/ui/PowerSearch/PowerSearchTermFinder.tsx b/desktop/flipper-plugin/src/ui/PowerSearch/PowerSearchTermFinder.tsx index 5cdef1961..c8cc37f7c 100644 --- a/desktop/flipper-plugin/src/ui/PowerSearch/PowerSearchTermFinder.tsx +++ b/desktop/flipper-plugin/src/ui/PowerSearch/PowerSearchTermFinder.tsx @@ -7,7 +7,7 @@ * @format */ -import {AutoComplete} from 'antd'; +import {AutoComplete, Input} from 'antd'; import * as React from 'react'; export type PowerSearchTermFinderOption = {label: string; value: string}; @@ -76,8 +76,22 @@ export const PowerSearchTermFinder = React.forwardRef< if (event.key === 'Backspace' && !searchTermFinderValue) { onBackspacePressWhileEmpty(); } - }} - /> + }}> + { + const text = event.clipboardData.getData('text/plain'); + + if (text && onConfirmUnknownOption) { + event.stopPropagation(); + event.preventDefault(); + + onConfirmUnknownOption(text); + setSearchTermFinderValue(null); + } + }} + /> + ); }, );