File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/components/Search/SearchRouter Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1- import React from 'react' ;
2- import type { StyleProp , ViewStyle } from 'react-native' ;
1+ import React , { useRef } from 'react' ;
2+ import type { StyleProp , View , ViewStyle } from 'react-native' ;
33import Icon from '@components/Icon' ;
44import * as Expensicons from '@components/Icon/Expensicons' ;
55import { PressableWithoutFeedback } from '@components/Pressable' ;
@@ -22,14 +22,19 @@ function SearchButton({style}: SearchButtonProps) {
2222 const theme = useTheme ( ) ;
2323 const { translate} = useLocalize ( ) ;
2424 const { openSearchRouter} = useSearchRouterContext ( ) ;
25+ const pressableRef = useRef < View > ( null ) ;
2526
2627 return (
2728 < Tooltip text = { translate ( 'common.search' ) } >
2829 < PressableWithoutFeedback
30+ ref = { pressableRef }
2931 nativeID = "searchButton"
3032 accessibilityLabel = { translate ( 'common.search' ) }
3133 style = { [ styles . flexRow , styles . touchableButtonImage , style ] }
34+ // eslint-disable-next-line react-compiler/react-compiler
3235 onPress = { Session . checkIfActionIsAllowed ( ( ) => {
36+ pressableRef ?. current ?. blur ( ) ;
37+
3338 Timing . start ( CONST . TIMING . OPEN_SEARCH ) ;
3439 Performance . markStart ( CONST . TIMING . OPEN_SEARCH ) ;
3540
You can’t perform that action at this time.
0 commit comments