Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/components/Search/SearchRouter/SearchButton.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import type {StyleProp, ViewStyle} from 'react-native';
import React, {useRef} from 'react';
import type {StyleProp, View, ViewStyle} from 'react-native';
import Icon from '@components/Icon';
import * as Expensicons from '@components/Icon/Expensicons';
import {PressableWithoutFeedback} from '@components/Pressable';
Expand All @@ -22,14 +22,19 @@ function SearchButton({style}: SearchButtonProps) {
const theme = useTheme();
const {translate} = useLocalize();
const {openSearchRouter} = useSearchRouterContext();
const pressableRef = useRef<View>(null);

return (
<Tooltip text={translate('common.search')}>
<PressableWithoutFeedback
ref={pressableRef}
nativeID="searchButton"
accessibilityLabel={translate('common.search')}
style={[styles.flexRow, styles.touchableButtonImage, style]}
// eslint-disable-next-line react-compiler/react-compiler
onPress={Session.checkIfActionIsAllowed(() => {
pressableRef?.current?.blur();

Timing.start(CONST.TIMING.OPEN_SEARCH);
Performance.markStart(CONST.TIMING.OPEN_SEARCH);

Expand Down