Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ type MoneyRequestReportTransactionItemProps = {

/** Whether this is the last item in the list */
isLastItem?: boolean;

/** Whether the list is horizontally scrollable */
shouldScrollHorizontally?: boolean;
};

function MoneyRequestReportTransactionItem({
Expand All @@ -93,6 +96,7 @@ function MoneyRequestReportTransactionItem({
shouldBeHighlighted,
nonPersonalAndWorkspaceCards,
isLastItem = false,
shouldScrollHorizontally = false,
}: MoneyRequestReportTransactionItemProps) {
const {translate} = useLocalize();
const styles = useThemeStyles();
Expand Down Expand Up @@ -164,7 +168,7 @@ function MoneyRequestReportTransactionItem({
amountColumnSize={amountColumnSize}
taxAmountColumnSize={taxAmountColumnSize}
shouldShowTooltip
shouldUseNarrowLayout={shouldUseNarrowLayout || isMediumScreenWidth}
shouldUseNarrowLayout={shouldUseNarrowLayout || (isMediumScreenWidth && !shouldScrollHorizontally)}
shouldShowCheckbox={!!isSelectionModeEnabled || !isSmallScreenWidth}
onCheckboxPress={toggleTransaction}
columns={columns}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,7 @@ function MoneyRequestReportTransactionList({
onArrowRightPress={handleArrowRightPress}
nonPersonalAndWorkspaceCards={nonPersonalAndWorkspaceCards ?? {}}
isLastItem={!showPendingExpensePlaceholder && transaction.transactionID === lastTransactionID}
shouldScrollHorizontally={shouldScrollHorizontally}
/>
);

Expand Down
2 changes: 1 addition & 1 deletion src/components/TransactionItemRow/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ function TransactionItemRow({
return (
<View
key={column}
style={[StyleUtils.getReportTableColumnStyles(CONST.SEARCH.TABLE_COLUMNS.TOTAL_AMOUNT, {isAmountColumnWide})]}
style={[StyleUtils.getReportTableColumnStyles(CONST.SEARCH.TABLE_COLUMNS.TOTAL_AMOUNT, {isAmountColumnWide, shouldRemoveTotalColumnFlex})]}
>
<AmountCell
total={totalAmount}
Expand Down
Loading