From a387c1ef87b9028fed77df7d67f4b715d022be66 Mon Sep 17 00:00:00 2001 From: Hubert Sosinski Date: Mon, 7 Jul 2025 17:10:39 +0200 Subject: [PATCH 1/3] Render ChatBubbleCell only if it's needed --- src/components/TransactionItemRow/index.tsx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/components/TransactionItemRow/index.tsx b/src/components/TransactionItemRow/index.tsx index 0582ef4e9305..635651b378fe 100644 --- a/src/components/TransactionItemRow/index.tsx +++ b/src/components/TransactionItemRow/index.tsx @@ -378,6 +378,9 @@ function TransactionItemRow({ ], ); const safeColumnWrapperStyle = columnWrapperStyles ?? [styles.p3, styles.expenseWidgetRadius]; + const shouldRenderChatBubbleCell = useMemo(() => { + return columns?.includes(CONST.REPORT.TRANSACTION_LIST.COLUMNS.COMMENTS); + }, [columns]); return ( - + {shouldRenderChatBubbleCell && ( + + )} From 3d084de9046103dd2042c86e7521a49d28bba9cc Mon Sep 17 00:00:00 2001 From: Hubert Sosinski Date: Fri, 11 Jul 2025 14:04:01 +0200 Subject: [PATCH 2/3] Eslint fixes --- src/components/TransactionItemRow/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/TransactionItemRow/index.tsx b/src/components/TransactionItemRow/index.tsx index acc78b9f2cf7..5cd9179b4624 100644 --- a/src/components/TransactionItemRow/index.tsx +++ b/src/components/TransactionItemRow/index.tsx @@ -383,7 +383,7 @@ function TransactionItemRow({ ); const safeColumnWrapperStyle = columnWrapperStyles ?? [styles.p3, styles.expenseWidgetRadius]; const shouldRenderChatBubbleCell = useMemo(() => { - return columns?.includes(CONST.REPORT.TRANSACTION_LIST.COLUMNS.COMMENTS); + return columns?.includes(CONST.REPORT.TRANSACTION_LIST.COLUMNS.COMMENTS) ?? false; }, [columns]); return ( Date: Fri, 11 Jul 2025 14:19:40 +0200 Subject: [PATCH 3/3] Small code cleanup --- src/components/TransactionItemRow/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/TransactionItemRow/index.tsx b/src/components/TransactionItemRow/index.tsx index 5cd9179b4624..5a38bd0bb178 100644 --- a/src/components/TransactionItemRow/index.tsx +++ b/src/components/TransactionItemRow/index.tsx @@ -385,6 +385,7 @@ function TransactionItemRow({ const shouldRenderChatBubbleCell = useMemo(() => { return columns?.includes(CONST.REPORT.TRANSACTION_LIST.COLUMNS.COMMENTS) ?? false; }, [columns]); + return (