Skip to content
Merged
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
1 change: 1 addition & 0 deletions src/CONST/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1647,6 +1647,7 @@ const CONST = {
// we set this height threshold to 30dpi, since gesture bars will never be taller than that. (Samsung & Huawei: ~14-15dpi)
NAVIGATION_BAR_ANDROID_SOFT_KEYS_MINIMUM_HEIGHT_THRESHOLD: 30,
TRANSACTION: {
RESULTS_PAGE_SIZE: 20,
DEFAULT_MERCHANT: 'Expense',
UNKNOWN_MERCHANT: 'Unknown Merchant',
PARTIAL_TRANSACTION_MERCHANT: '(none)',
Expand Down
108 changes: 45 additions & 63 deletions src/components/AnimatedCollapsible/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, {useEffect, useRef} from 'react';
import React, {useEffect} from 'react';
import type {ReactNode} from 'react';
import {View} from 'react-native';
import type {StyleProp, ViewStyle} from 'react-native';
import Animated, {useAnimatedStyle, useDerivedValue, useSharedValue, withTiming} from 'react-native-reanimated';
import Animated, {runOnJS, useAnimatedStyle, useDerivedValue, useSharedValue, withTiming} from 'react-native-reanimated';
import Icon from '@components/Icon';
import * as Expensicons from '@components/Icon/Expensicons';
import {easing} from '@components/Modal/ReanimatedModal/utils';
Expand Down Expand Up @@ -47,61 +47,43 @@ function AnimatedCollapsible({isExpanded, children, header, duration = 300, styl
const theme = useTheme();
const styles = useThemeStyles();
const contentHeight = useSharedValue(0);
const isAnimating = useSharedValue(false);
const hasExpanded = useSharedValue(false);
const isExpandedFirstTime = useRef(false);
const hasExpanded = useSharedValue(isExpanded);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Permanent overflow: 'hidden' can clip content that should escape the container after animations finish.
ℹ️ While the issue is not visible in our testing steps, this is how I tested / found this issue:

  • in the TransactionGroupListItem.tsx component where we map / render visibleTransactions I added an extra piece of absolute-positioned UI (a badge)
Code spoiler
{visibleTransactions.map((transaction) => (
    <OfflineWithFeedback
        pendingAction={transaction.pendingAction}
        key={transaction.transactionID}
    >
        <View style={{position: 'relative'}}>
            <TransactionItemRow
                report={transaction.report}
                transactionItem={transaction}
                violations={getTransactionViolations(transaction, violations)}
                isSelected={!!transaction.isSelected}
                dateColumnSize={dateColumnSize}
                amountColumnSize={amountColumnSize}
                taxAmountColumnSize={taxAmountColumnSize}
                shouldShowTooltip={showTooltip}
                shouldUseNarrowLayout={!isLargeScreenWidth}
                shouldShowCheckbox={!!canSelectMultiple}
                onCheckboxPress={() => onCheckboxPress?.(transaction as unknown as TItem)}
                columns={currentColumns}
                onButtonPress={() => {
                    openReportInRHP(transaction);
                }}
                style={[styles.noBorderRadius, shouldUseNarrowLayout ? [styles.p3, styles.pt2] : [styles.ph3, styles.pv1Half], isGroupByReports && styles.pr10]}
                isReportItemChild
                isInSingleTransactionReport={groupItem.transactions.length === 1}
                areAllOptionalColumnsHidden={areAllOptionalColumnsHidden}
            />
            {/* Debug badge that extends outside the row/container */}
            <View
                testID="overflowBadge"
                style={{
                    position: 'absolute',
                    bottom: -24, // extend beyond the container
                    right: 16,
                    width: 90,
                    height: 24,
                    backgroundColor: 'red',
                    alignItems: 'center',
                    justifyContent: 'center',
                }}
            >
                <Text style={{color: 'white'}}>Badge</Text>
            </View>
        </View>
    </OfflineWithFeedback>
))}

Why it matters:

  • Components inside the collapsible (e.g., tooltips, popovers, absolute-positioned buttons/menus) may be visually clipped if overflow stays hidden after expand. Previously, overflow was set to 'hidden' only while animating, and then 'visible' again.
  • Concrete example: If a row inside the collapsible opens a context menu or a tooltip that extends beyond the container’s bounds, it will be cut off, especially on mobile (strict iOS: Native) where these overlays frequently extend beyond their parent.

Fix approach:

  • Compute animation progress and only set overflow: 'hidden' while the height is mid-transition. Once fully expanded or fully collapsed, set it to 'visible' (expanded) or 'hidden' (collapsed).
  • This avoids storing an extra isAnimating shared value and keeps logic declarative.

Example fix

// Replace the withTiming(height)-only approach with a normalized progress
// so you can infer "isAnimating" from progress.
const expandedSV = useSharedValue(isExpanded);

useEffect(() => {
    expandedSV.value = isExpanded;
}, [isExpanded, expandedSV]);

const progress = useDerivedValue(() => {
    // 0 = collapsed, 1 = expanded
    return withTiming(expandedSV.value ? 1 : 0, {duration, easing});
}, [duration]);

const contentAnimatedStyle = useAnimatedStyle(() => {
    const h = contentHeight.value * progress.value;
    const isAnimating = progress.value > 0 && progress.value < 1;
    const progressVisibility = progress.value === 1 ? 'visible' : 'hidden';
    return {
        height: h,
        overflow: isAnimating ? 'hidden' : progressVisibility,
    };
});

Results

Before After
before after

@LukasMod LukasMod Oct 14, 2025 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The animation looks the same with overflow: "visible". I'll skip this logic and not manipulate that style at all, leaving it at the default. Final effect is like "After" in your comment.
Screenshot 2025-10-14 at 15 46 21

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Conditional unmounting can cause “first expand” jank and misses the “keep-mounted-while-collapsing” behavior

In addition to the ☝️ above comment:

Why it matters:

  • With mount-on-expand, the very first expand has to measure content. animatedHeight tries to animate to contentHeight, but contentHeight is 0 until onLayout runs. This can lead to a two-phase expand where height goes 0 → 0 → measuredHeight, which feels like a hitch on slower devices.
  • When collapsing, we remove children immediately (conditional render), but we also rely on FadeOut. Reanimated exit animations will run, but the container height is also animating to 0. If we ever remove entering/exiting or it fails on web, the collapse might snap shut visually.

Fix approach:

  • Keep children rendered until the collapse animation (progress) finishes, then unmount. This preserves smooth transitions and avoids measuring hitches.
  • We can keep your FadeIn/FadeOut and still unmount at the end of animation to keep the performance win.

Example fix

const [isRendered, setIsRendered] = React.useState(isExpanded);

useEffect(() => {
    if (isExpanded) {
        setIsRendered(true);
    }
}, [isExpanded]);

// When animation completes to 0, unmount using runOnJS to avoid UI-thread state updates
useAnimatedReaction(
    () => progress.value,
    (p, prev) => {
        if (prev !== undefined && prev > 0 && p === 0) {
            runOnJS(setIsRendered)(false);
        }
    },
    [],
);

// Use isRendered for conditional rendering instead of isExpanded directly
<Animated.View style={[contentAnimatedStyle, contentStyle]}>
    {isRendered ? (
        <Animated.View
            style={styles.stickToTop}
            entering={FadeIn}
            exiting={FadeOut}
            onLayout={(e) => {
                const h = e.nativeEvent.layout.height;
                if (h) {
                    contentHeight.value = h;
                }
            }}
        >
            ...
        </Animated.View>
    ) : null}
</Animated.View>

Here's a complete example with code changes combined from the ☝️ above comment + this comment's suggested fix:

Code spoiler
import React, {useEffect, useState} from 'react';
import {View} from 'react-native';
import Animated, {
    FadeIn,
    FadeOut,
    runOnJS,
    useAnimatedReaction,
    useAnimatedStyle,
    useDerivedValue,
    useSharedValue,
    withTiming,
} from 'react-native-reanimated';
import {easing} from '@components/Modal/ReanimatedModal/utils';
import useThemeStyles from '@hooks/useThemeStyles';

type Props = {
    isExpanded: boolean;
    header: React.ReactNode;
    children: React.ReactNode;
    duration?: number;
    style?: any;
    contentStyle?: any;
};

function AnimatedCollapsible({isExpanded, children, header, duration = 300, style, contentStyle}: Props) {
    const styles = useThemeStyles();

    // Measure + animation state
    const contentHeight = useSharedValue(0);
    const hasMeasured = useSharedValue(false);
    const isExpandedSV = useSharedValue(isExpanded);

    // Keep children mounted while collapsing; unmount only after progress reaches 0
    const [isRendered, setIsRendered] = useState(isExpanded);

    useEffect(() => {
        isExpandedSV.value = isExpanded;
        if (isExpanded) {
            // Mount immediately so we can measure before animating
            setIsRendered(true);
        }
    }, [isExpanded, isExpandedSV]);

    // 0 = collapsed, 1 = expanded; wait for measurement before animating open
    const progress = useDerivedValue(() => {
        const target = isExpandedSV.value && hasMeasured.value ? 1 : 0;
        return withTiming(target, {duration, easing});
    }, [duration]);

    // When collapse animation finishes (progress -> 0), unmount content
    useAnimatedReaction(
        () => progress.value,
        (p, prev) => {
            if (prev !== undefined && prev > 0 && p === 0) {
                runOnJS(setIsRendered)(false);
            }
        },
        [],
    );

    const contentAnimatedStyle = useAnimatedStyle(() => {
        const h = hasMeasured.value ? contentHeight.value * progress.value : 0;
        const isAnimating = progress.value > 0 && progress.value < 1;

        return {
            height: h,
            // Hide overflow during the transition; once fully expanded, allow overflow
            overflow: isAnimating ? 'hidden' : progress.value === 1 ? 'visible' : 'hidden',
        };
    });

    return (
        <View style={style}>
            <View style={[headerStyle, styles.flexRow, styles.alignItemsCenter]}>
                <View style={[styles.flex1]}>{header}</View>
                <PressableWithFeedback
                    onPress={onPress}
                    disabled={disabled}
                    style={[styles.p3, styles.justifyContentCenter, styles.alignItemsCenter, expandButtonStyle]}
                    accessibilityRole={CONST.ROLE.BUTTON}
                    accessibilityLabel={isExpanded ? 'Collapse' : 'Expand'}
                >
                    {({hovered}) => (
                        <Icon
                            src={isExpanded ? Expensicons.UpArrow : Expensicons.DownArrow}
                            fill={hovered ? theme.textSupporting : theme.icon}
                            small
                        />
                    )}
                </PressableWithFeedback>
            </View>
            <Animated.View style={[contentAnimatedStyle, contentStyle]}>
                {isRendered ? (
                    <Animated.View
                        style={styles.stickToTop}
                        entering={FadeIn}
                        exiting={FadeOut}
                        onLayout={(e) => {
                            const h = e.nativeEvent.layout.height;
                            if (h) {
                                contentHeight.value = h;
                                hasMeasured.value = true;
                            }
                        }}
                    >
                        <View style={[styles.pv2, styles.ph3]}>
                            <View style={[styles.borderBottom]} />
                        </View>
                        {children}
                    </Animated.View>
                ) : null}
            </Animated.View>
        </View>
    );
}

export default AnimatedCollapsible;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • I added additional conditions to animatedHeight to skip the initial no-op animation as proposed, but I used contentHeight value to not introduce a new one.
        if (!contentHeight.get()) {
            return 0;
        }
  • I introduced const [isRendered, setIsRendered] = React.useState(isExpanded); as requested, to delay removing the content until the animation finishes.
    I use it as {isExpanded || isRendered ? <... />} to remove the content later, but mount it as soon as possible.
    Without the isExpanded check, there was a weird effect on iOS where the content expanded quickly but rendered slightly too late.
  • I replaced FadeOut/FadeIn with animatedOpacity.get()

const [isRendered, setIsRendered] = React.useState(isExpanded);

useEffect(() => {
if (!isExpanded && !isExpandedFirstTime.current) {
return;
hasExpanded.set(isExpanded);
if (isExpanded) {
setIsRendered(true);
}
if (isExpandedFirstTime.current) {
hasExpanded.set(true);
} else {
isExpandedFirstTime.current = true;
}, [isExpanded, hasExpanded]);

const animatedHeight = useDerivedValue(() => {
if (!contentHeight.get()) {
return 0;
}
}, [hasExpanded, isExpanded]);

// Animation for content height and opacity
const derivedHeight = useDerivedValue(() => {
const targetHeight = isExpanded ? contentHeight.get() : 0;
return withTiming(
targetHeight,
{
duration,
easing,
},
(finished) => {
if (!finished) {
return;
}
isAnimating.set(false);
},
);
});

const derivedOpacity = useDerivedValue(() => {
const targetOpacity = isExpanded ? 1 : 0;
isAnimating.set(true);
return withTiming(targetOpacity, {
duration,
easing,
const target = hasExpanded.get() ? contentHeight.get() : 0;

return withTiming(target, {duration, easing}, (finished) => {
if (!finished || target) {
return;
}
runOnJS(setIsRendered)(false);
});
});
}, []);

const contentAnimatedStyle = useAnimatedStyle(() => {
if (!isExpanded && !hasExpanded.get()) {
return {
height: 0,
opacity: 0,
overflow: 'hidden',
};
const animatedOpacity = useDerivedValue(() => {
if (!contentHeight.get()) {
return 0;
}

return withTiming(hasExpanded.get() ? 1 : 0, {duration, easing});
});

const contentAnimatedStyle = useAnimatedStyle(() => {
return {
height: !hasExpanded.get() ? undefined : derivedHeight.get(),
opacity: derivedOpacity.get(),
overflow: isAnimating.get() ? 'hidden' : 'visible',
height: animatedHeight.get(),
opacity: animatedOpacity.get(),
};
});

Expand All @@ -126,22 +108,22 @@ function AnimatedCollapsible({isExpanded, children, header, duration = 300, styl
</PressableWithFeedback>
</View>
<Animated.View style={[contentAnimatedStyle, contentStyle]}>
<View
onLayout={(e) => {
if (!e.nativeEvent.layout.height) {
return;
}
if (!isExpanded) {
hasExpanded.set(true);
}
contentHeight.set(e.nativeEvent.layout.height);
}}
>
<View style={[styles.pv2, styles.ph3]}>
<View style={[styles.borderBottom]} />
</View>
{children}
</View>
{isExpanded || isRendered ? (
<Animated.View
style={styles.stickToTop}
onLayout={(e) => {
const height = e.nativeEvent.layout.height;
if (height) {
contentHeight.set(height);
}
}}
>
<View style={[styles.pv2, styles.ph3]}>
<View style={[styles.borderBottom]} />
</View>
{children}
</Animated.View>
) : null}
</Animated.View>
</View>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,233 @@
import React, {useCallback, useContext, useMemo} from 'react';
import {View} from 'react-native';
import ActivityIndicator from '@components/ActivityIndicator';
import Button from '@components/Button';
import OfflineWithFeedback from '@components/OfflineWithFeedback';
import {useSearchContext} from '@components/Search/SearchContext';
import type {SearchColumnType} from '@components/Search/types';
import SearchTableHeader, {getExpenseHeaders} from '@components/SelectionListWithSections/SearchTableHeader';
import type {ListItem, TransactionGroupListExpandedProps, TransactionListItemType} from '@components/SelectionListWithSections/types';
import Text from '@components/Text';
import TransactionItemRow from '@components/TransactionItemRow';
import {WideRHPContext} from '@components/WideRHPContextProvider';
import useLocalize from '@hooks/useLocalize';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import {getReportIDForTransaction} from '@libs/MoneyRequestReportUtils';
import Navigation from '@libs/Navigation/Navigation';
import {getReportAction} from '@libs/ReportActionsUtils';
import {createAndOpenSearchTransactionThread, getColumnsToShow} from '@libs/SearchUIUtils';
import {getTransactionViolations} from '@libs/TransactionUtils';
import {setActiveTransactionThreadIDs} from '@userActions/TransactionThreadNavigation';
import CONST from '@src/CONST';
import ROUTES from '@src/ROUTES';

function TransactionGroupListExpanded<TItem extends ListItem>({
transactionsQueryJSON,
showTooltip,
canSelectMultiple,
onCheckboxPress,
columns,
groupBy,
accountID,
isOffline,
violations,
areAllOptionalColumnsHidden: areAllOptionalColumnsHiddenProp,
transactions,
transactionsVisibleLimit,
setTransactionsVisibleLimit,
isEmpty,
isGroupByReports,
transactionsSnapshot,
shouldDisplayEmptyView,
searchTransactions,
isInSingleTransactionReport,
}: TransactionGroupListExpandedProps<TItem>) {
const theme = useTheme();
const styles = useThemeStyles();
const {translate} = useLocalize();
const {currentSearchHash} = useSearchContext();
const transactionsSnapshotMetadata = useMemo(() => {
return transactionsSnapshot?.search;
}, [transactionsSnapshot]);

const visibleTransactions = useMemo(() => {
if (isGroupByReports) {
return transactions.slice(0, transactionsVisibleLimit);
}
return transactions;
}, [transactions, transactionsVisibleLimit, isGroupByReports]);

const currentColumns = useMemo(() => {
if (isGroupByReports) {
return columns ?? [];
}
if (!transactionsSnapshot?.data) {
return [];
}
const columnsToShow = getColumnsToShow(accountID, transactionsSnapshot?.data, false, transactionsSnapshot?.search.type === CONST.SEARCH.DATA_TYPES.TASK);

return (Object.keys(columnsToShow) as SearchColumnType[]).filter((col) => columnsToShow[col]);
}, [accountID, columns, isGroupByReports, transactionsSnapshot?.data, transactionsSnapshot?.search.type]);

const areAllOptionalColumnsHidden = useMemo(() => {
if (isGroupByReports) {
return areAllOptionalColumnsHiddenProp ?? false;
}
const canBeMissingColumns = getExpenseHeaders(groupBy)
.filter((header) => header.canBeMissing)
.map((header) => header.columnName);
return canBeMissingColumns.every((column) => !currentColumns.includes(column));
}, [areAllOptionalColumnsHiddenProp, currentColumns, groupBy, isGroupByReports]);

// Currently only the transaction report groups have transactions where the empty view makes sense
const shouldDisplayShowMoreButton = isGroupByReports ? transactions.length > transactionsVisibleLimit : !!transactionsSnapshotMetadata?.hasMoreResults && !isOffline;
const currentOffset = transactionsSnapshotMetadata?.offset ?? 0;
const shouldShowLoadingOnSearch = !!(!transactions?.length && transactionsSnapshotMetadata?.isLoading) || currentOffset > 0;
const shouldDisplayLoadingIndicator = !isGroupByReports && !!transactionsSnapshotMetadata?.isLoading && shouldShowLoadingOnSearch;
const {isLargeScreenWidth, shouldUseNarrowLayout} = useResponsiveLayout();

const {amountColumnSize, dateColumnSize, taxAmountColumnSize} = useMemo(() => {
const isAmountColumnWide = transactions.some((transaction) => transaction.isAmountColumnWide);
const isTaxAmountColumnWide = transactions.some((transaction) => transaction.isTaxAmountColumnWide);
const shouldShowYearForSomeTransaction = transactions.some((transaction) => transaction.shouldShowYear);
return {
amountColumnSize: isAmountColumnWide ? CONST.SEARCH.TABLE_COLUMN_SIZES.WIDE : CONST.SEARCH.TABLE_COLUMN_SIZES.NORMAL,
taxAmountColumnSize: isTaxAmountColumnWide ? CONST.SEARCH.TABLE_COLUMN_SIZES.WIDE : CONST.SEARCH.TABLE_COLUMN_SIZES.NORMAL,
dateColumnSize: shouldShowYearForSomeTransaction ? CONST.SEARCH.TABLE_COLUMN_SIZES.WIDE : CONST.SEARCH.TABLE_COLUMN_SIZES.NORMAL,
};
}, [transactions]);

const {markReportIDAsExpense} = useContext(WideRHPContext);
const openReportInRHP = (transactionItem: TransactionListItemType) => {
const backTo = Navigation.getActiveRoute();
const reportID = getReportIDForTransaction(transactionItem);

const navigateToTransactionThread = () => {
if (transactionItem.transactionThreadReportID === CONST.REPORT.UNREPORTED_REPORT_ID) {
const iouAction = getReportAction(transactionItem.report?.reportID, transactionItem.moneyRequestReportActionID);
createAndOpenSearchTransactionThread(transactionItem, iouAction, currentSearchHash, backTo);
return;
}
markReportIDAsExpense(reportID);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coming from #72178, we need to check if the report is invoice or task, if so, we shouldn't mark it as expense

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR focused on another issue, logic mentioned is only copied from src/components/SelectionListWithSections/Search/TransactionGroupListItem.tsx

Navigation.navigate(ROUTES.SEARCH_REPORT.getRoute({reportID, backTo}));
};

// The arrow navigation in RHP is only allowed for group-by:reports
if (!isGroupByReports) {
navigateToTransactionThread();
return;
}

const siblingTransactionThreadIDs = transactions.map(getReportIDForTransaction);

// When opening the transaction thread in RHP we need to find every other ID for the rest of transactions
// to display prev/next arrows in RHP for navigation
setActiveTransactionThreadIDs(siblingTransactionThreadIDs).then(() => {
// If we're trying to open a transaction without a transaction thread, let's create the thread and navigate the user
navigateToTransactionThread();
});
};

const onShowMoreButtonPress = useCallback(() => {
if (isGroupByReports) {
setTransactionsVisibleLimit((currentPageSize) => currentPageSize + CONST.TRANSACTION.RESULTS_PAGE_SIZE);
} else if (!isOffline && transactionsQueryJSON) {
searchTransactions(CONST.SEARCH.RESULTS_PAGE_SIZE);
}
}, [isGroupByReports, isOffline, transactionsQueryJSON, setTransactionsVisibleLimit, searchTransactions]);

if (shouldDisplayEmptyView) {
return (
<View style={[styles.alignItemsCenter, styles.justifyContentCenter, styles.mnh13]}>
<Text
style={[styles.textLabelSupporting]}
numberOfLines={1}
>
{translate('search.moneyRequestReport.emptyStateTitle')}
</Text>
</View>
);
}

return (
<>
{isLargeScreenWidth && (
<View
style={[styles.searchListHeaderContainerStyle, styles.groupSearchListTableContainerStyle, styles.bgTransparent, styles.pl9, isGroupByReports ? styles.pr10 : styles.pr3]}
>
<SearchTableHeader
canSelectMultiple
type={CONST.SEARCH.DATA_TYPES.EXPENSE}
onSortPress={() => {}}
sortOrder={undefined}
sortBy={undefined}
shouldShowYear={dateColumnSize === CONST.SEARCH.TABLE_COLUMN_SIZES.WIDE}
isAmountColumnWide={amountColumnSize === CONST.SEARCH.TABLE_COLUMN_SIZES.WIDE}
isTaxAmountColumnWide={taxAmountColumnSize === CONST.SEARCH.TABLE_COLUMN_SIZES.WIDE}
shouldShowSorting={false}
columns={currentColumns}
areAllOptionalColumnsHidden={areAllOptionalColumnsHidden ?? false}
groupBy={groupBy}
/>
</View>
)}
{visibleTransactions.map((transaction) => (
<OfflineWithFeedback
pendingAction={transaction.pendingAction}
key={transaction.transactionID}
>
<TransactionItemRow
report={transaction.report}
transactionItem={transaction}
violations={getTransactionViolations(transaction, violations)}
isSelected={!!transaction.isSelected}
dateColumnSize={dateColumnSize}
amountColumnSize={amountColumnSize}
taxAmountColumnSize={taxAmountColumnSize}
shouldShowTooltip={showTooltip}
shouldUseNarrowLayout={!isLargeScreenWidth}
shouldShowCheckbox={!!canSelectMultiple}
onCheckboxPress={() => onCheckboxPress?.(transaction as unknown as TItem)}
columns={currentColumns}
onButtonPress={() => {
openReportInRHP(transaction);
}}
style={[styles.noBorderRadius, shouldUseNarrowLayout ? [styles.p3, styles.pt2] : [styles.ph3, styles.pv1Half], isGroupByReports && styles.pr10]}
isReportItemChild
isInSingleTransactionReport={isInSingleTransactionReport}
areAllOptionalColumnsHidden={areAllOptionalColumnsHidden}
/>
</OfflineWithFeedback>
))}
{shouldDisplayShowMoreButton && !shouldDisplayLoadingIndicator && (
<View style={[styles.w100, styles.flexRow, isLargeScreenWidth && styles.pl10]}>
<Button
text={translate('common.showMore')}
onPress={onShowMoreButtonPress}
link
shouldUseDefaultHover={false}
isNested
medium
innerStyles={[styles.ph3]}
textStyles={[styles.fontSizeNormal]}
/>
</View>
)}
{shouldDisplayLoadingIndicator && (
<View style={[isLargeScreenWidth && styles.pl10, styles.pt3, isEmpty && styles.pb3]}>
<ActivityIndicator
color={theme.spinner}
size={25}
style={[styles.pl3, !isEmpty && styles.alignItemsStart]}
/>
</View>
)}
</>
);
}

TransactionGroupListExpanded.displayName = 'TransactionGroupListExpanded';

export default TransactionGroupListExpanded;
Loading