From 517795f4daeeb06171d62fe27f10fda60cbd8221 Mon Sep 17 00:00:00 2001 From: nkdengineer Date: Wed, 3 Sep 2025 10:08:07 +0700 Subject: [PATCH 1/2] fix: missing Submit button and Hold option --- src/hooks/useSearchHighlightAndScroll.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/hooks/useSearchHighlightAndScroll.ts b/src/hooks/useSearchHighlightAndScroll.ts index abbcdd80b917..7a27930c2bd4 100644 --- a/src/hooks/useSearchHighlightAndScroll.ts +++ b/src/hooks/useSearchHighlightAndScroll.ts @@ -9,6 +9,7 @@ import type {SearchKey} from '@libs/SearchUIUtils'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import type {ReportActions, SearchResults, Transaction} from '@src/types/onyx'; +import { InteractionManager } from 'react-native'; import useNetwork from './useNetwork'; import usePrevious from './usePrevious'; @@ -112,7 +113,9 @@ function useSearchHighlightAndScroll({ triggeredByHookRef.current = true; // Trigger the search - search({queryJSON, searchKey, offset, shouldCalculateTotals}); + InteractionManager.runAfterInteractions(() => { + search({queryJSON, searchKey, offset, shouldCalculateTotals}); + }); // Set the ref to prevent further triggers until reset searchTriggeredRef.current = true; From 43fd5a8de589385084d834b68371a86a204eeba6 Mon Sep 17 00:00:00 2001 From: nkdengineer Date: Wed, 3 Sep 2025 10:37:53 +0700 Subject: [PATCH 2/2] fix prettier --- src/hooks/useSearchHighlightAndScroll.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/useSearchHighlightAndScroll.ts b/src/hooks/useSearchHighlightAndScroll.ts index 7a27930c2bd4..c785472fc94f 100644 --- a/src/hooks/useSearchHighlightAndScroll.ts +++ b/src/hooks/useSearchHighlightAndScroll.ts @@ -1,5 +1,6 @@ import {useIsFocused} from '@react-navigation/native'; import {useCallback, useEffect, useMemo, useRef, useState} from 'react'; +import {InteractionManager} from 'react-native'; import type {OnyxCollection, OnyxEntry} from 'react-native-onyx'; import type {SearchQueryJSON} from '@components/Search/types'; import type {SearchListItem, SelectionListHandle, TransactionGroupListItemType, TransactionListItemType} from '@components/SelectionList/types'; @@ -9,7 +10,6 @@ import type {SearchKey} from '@libs/SearchUIUtils'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import type {ReportActions, SearchResults, Transaction} from '@src/types/onyx'; -import { InteractionManager } from 'react-native'; import useNetwork from './useNetwork'; import usePrevious from './usePrevious';