diff --git a/src/components/MenuItem.tsx b/src/components/MenuItem.tsx index 259ae3170825..19703f7a3c92 100644 --- a/src/components/MenuItem.tsx +++ b/src/components/MenuItem.tsx @@ -345,6 +345,9 @@ type MenuItemBaseProps = { /** Should use auto width for the icon container. */ shouldIconUseAutoWidthStyle?: boolean; + + /** Should break word for room title */ + shouldBreakWord?: boolean; }; type MenuItemProps = (IconProps | AvatarProps | NoIcon) & MenuItemBaseProps; @@ -457,6 +460,7 @@ function MenuItem( shouldShowSelectedItemCheck = false, onHideTooltip, shouldIconUseAutoWidthStyle = false, + shouldBreakWord = false, }: MenuItemProps, ref: PressableRef, ) { @@ -482,6 +486,7 @@ function MenuItem( interactive && disabled ? {...styles.userSelectNone} : {}, styles.ltr, isDeleted ? styles.offlineFeedback.deleted : {}, + shouldBreakWord ? styles.breakWord : {}, ], titleStyle ?? {}, ); diff --git a/src/pages/ReportDetailsPage.tsx b/src/pages/ReportDetailsPage.tsx index 254e16c11361..54f79676fd37 100644 --- a/src/pages/ReportDetailsPage.tsx +++ b/src/pages/ReportDetailsPage.tsx @@ -744,6 +744,8 @@ function ReportDetailsPage({policies, report, route, reportMetadata}: ReportDeta description={!shouldDisableRename ? roomDescription : ''} furtherDetails={chatRoomSubtitle && !isGroupChat ? additionalRoomDetails : ''} onPress={() => Navigation.navigate(ROUTES.REPORT_SETTINGS_NAME.getRoute(report.reportID, backTo))} + numberOfLinesTitle={isThread ? 2 : 0} + shouldBreakWord />