From e32cd610572bb6a5ff7ac5015520107fadc8363e Mon Sep 17 00:00:00 2001 From: Mohammad Jafarinejad <71210799+mohammadjafarinejad@users.noreply.github.com> Date: Tue, 6 Jan 2026 21:56:24 +0400 Subject: [PATCH 1/4] Reports - Tap on expands shows nothing in selection mode --- .../Search/TransactionGroupListItem.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/SelectionListWithSections/Search/TransactionGroupListItem.tsx b/src/components/SelectionListWithSections/Search/TransactionGroupListItem.tsx index 0bf7121eabf31..55456a545ae77 100644 --- a/src/components/SelectionListWithSections/Search/TransactionGroupListItem.tsx +++ b/src/components/SelectionListWithSections/Search/TransactionGroupListItem.tsx @@ -199,9 +199,12 @@ function TransactionGroupListItem({ onSelectRow(item, transactionPreviewData); } if (!isExpenseReportType) { + if (groupItem.transactionsQueryJSON && !isExpanded) { + searchTransactions(); + } handleToggle(); } - }, [isExpenseReportType, transactions.length, onSelectRow, transactionPreviewData, item, handleToggle]); + }, [isExpenseReportType, transactions.length, onSelectRow, transactionPreviewData, item, handleToggle, groupItem.transactionsQueryJSON, isExpanded, searchTransactions]); const onLongPress = useCallback(() => { if (isEmpty) { From f7ce5f10b5d021bc4dafda106978b4b867d5d541 Mon Sep 17 00:00:00 2001 From: Mohammad Jafarinejad <71210799+mohammadjafarinejad@users.noreply.github.com> Date: Sun, 1 Feb 2026 15:34:20 -0800 Subject: [PATCH 2/4] Add check for empty transactions Co-authored-by: Cong Pham --- .../Search/TransactionGroupListItem.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/SelectionListWithSections/Search/TransactionGroupListItem.tsx b/src/components/SelectionListWithSections/Search/TransactionGroupListItem.tsx index 6e1edddc4bec9..1c8aa91d28bd7 100644 --- a/src/components/SelectionListWithSections/Search/TransactionGroupListItem.tsx +++ b/src/components/SelectionListWithSections/Search/TransactionGroupListItem.tsx @@ -229,7 +229,7 @@ function TransactionGroupListItem({ onSelectRow(item, transactionPreviewData); } if (!isExpenseReportType) { - if (groupItem.transactionsQueryJSON && !isExpanded) { + if (groupItem.transactionsQueryJSON && !isExpanded && transactions.length === 0) { searchTransactions(); } handleToggle(); From 420a18479f6b06aba148f00483855c89cd2cdff7 Mon Sep 17 00:00:00 2001 From: Mohammad Jafarinejad <71210799+mohammadjafarinejad@users.noreply.github.com> Date: Mon, 2 Feb 2026 03:44:51 +0400 Subject: [PATCH 3/4] fix: add sentry label --- .../Search/TransactionGroupListItem.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/SelectionListWithSections/Search/TransactionGroupListItem.tsx b/src/components/SelectionListWithSections/Search/TransactionGroupListItem.tsx index 1c8aa91d28bd7..9764910935b4a 100644 --- a/src/components/SelectionListWithSections/Search/TransactionGroupListItem.tsx +++ b/src/components/SelectionListWithSections/Search/TransactionGroupListItem.tsx @@ -512,6 +512,7 @@ function TransactionGroupListItem({ disabled={isDisabled && !isItemSelected} accessibilityLabel={item.text ?? ''} role={getButtonRole(true)} + sentryLabel="TransactionGroupListItem" isNested hoverStyle={[!item.isDisabled && styles.hoveredComponentBG, isItemSelected && styles.activeComponentBG]} dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: true, [CONST.INNER_BOX_SHADOW_ELEMENT]: false}} From 80002c7e77603e727a54f4b93c3a81596c11b904 Mon Sep 17 00:00:00 2001 From: Mohammad Jafarinejad <71210799+mohammadjafarinejad@users.noreply.github.com> Date: Sun, 8 Feb 2026 13:07:07 +0400 Subject: [PATCH 4/4] fix: expand bug --- .../Search/TransactionGroupListItem.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/components/SelectionListWithSections/Search/TransactionGroupListItem.tsx b/src/components/SelectionListWithSections/Search/TransactionGroupListItem.tsx index ffc243484f387..afc854f6525f3 100644 --- a/src/components/SelectionListWithSections/Search/TransactionGroupListItem.tsx +++ b/src/components/SelectionListWithSections/Search/TransactionGroupListItem.tsx @@ -235,12 +235,9 @@ function TransactionGroupListItem({ onSelectRow(item, transactionPreviewData); } if (!isExpenseReportType) { - if (groupItem.transactionsQueryJSON && !isExpanded && transactions.length === 0) { - searchTransactions(); - } handleToggle(); } - }, [isExpenseReportType, transactions.length, onSelectRow, transactionPreviewData, item, handleToggle, groupItem.transactionsQueryJSON, isExpanded, searchTransactions]); + }, [isExpenseReportType, transactions.length, onSelectRow, transactionPreviewData, item, handleToggle]); const onLongPress = useCallback(() => { onLongPressRow?.(item, isExpenseReportType ? undefined : transactions); @@ -263,6 +260,8 @@ function TransactionGroupListItem({ const onExpandIconPress = useCallback(() => { if (isEmpty && !shouldDisplayEmptyView) { onPress(); + // onPress handles handleToggle() for us, so we return early to avoid calling it twice + return; } handleToggle(); }, [isEmpty, shouldDisplayEmptyView, handleToggle, onPress]); @@ -517,7 +516,6 @@ function TransactionGroupListItem({ sentryLabel={CONST.SENTRY_LABEL.SEARCH.TRANSACTION_GROUP_LIST_ITEM} accessibilityLabel={item.text ?? ''} role={getButtonRole(true)} - sentryLabel="TransactionGroupListItem" isNested hoverStyle={[!item.isDisabled && styles.hoveredComponentBG, isItemSelected && styles.activeComponentBG]} dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: true, [CONST.INNER_BOX_SHADOW_ELEMENT]: false}}