diff --git a/src/pages/inbox/report/ReportActionsList.tsx b/src/pages/inbox/report/ReportActionsList.tsx index f0716d8d37dc8..e7bb5fba20264 100644 --- a/src/pages/inbox/report/ReportActionsList.tsx +++ b/src/pages/inbox/report/ReportActionsList.tsx @@ -639,6 +639,9 @@ function ReportActionsList({ * the height of the smallest report action possible. */ const initialNumToRender = useMemo((): number | undefined => { + if (shouldScrollToEndAfterLayout && (!hasCreatedActionAdded || isOffline)) { + return sortedVisibleReportActions.length; + } const minimumReportActionHeight = styles.chatItem.paddingTop + styles.chatItem.paddingBottom + variables.fontSizeNormalHeight; const availableHeight = windowHeight - (CONST.CHAT_FOOTER_MIN_HEIGHT + variables.contentHeaderHeight); const numToRender = Math.ceil(availableHeight / minimumReportActionHeight); @@ -646,7 +649,16 @@ function ReportActionsList({ return getInitialNumToRender(numToRender); } return numToRender || undefined; - }, [styles.chatItem.paddingBottom, styles.chatItem.paddingTop, windowHeight, linkedReportActionID]); + }, [ + styles.chatItem.paddingBottom, + styles.chatItem.paddingTop, + windowHeight, + linkedReportActionID, + shouldScrollToEndAfterLayout, + hasCreatedActionAdded, + sortedVisibleReportActions.length, + isOffline, + ]); /** * Thread's divider line should hide when the first chat in the thread is marked as unread.