From 18e3e6c8275237027382baa5ef68c9a3c47df296 Mon Sep 17 00:00:00 2001 From: Tomasz Misiukiewicz Date: Wed, 13 May 2026 11:33:16 +0200 Subject: [PATCH] perf(search): remove dead policies and queryJSONHash props from ListItem --- src/components/Search/SearchList/ListItem/types.ts | 3 --- src/components/Search/SearchList/index.tsx | 8 +------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/components/Search/SearchList/ListItem/types.ts b/src/components/Search/SearchList/ListItem/types.ts index 5051596d1df4..922dfe03095b 100644 --- a/src/components/Search/SearchList/ListItem/types.ts +++ b/src/components/Search/SearchList/ListItem/types.ts @@ -48,8 +48,6 @@ type SearchListActionProps = { }; type ChatListItemProps = ListItemProps & { - queryJSONHash?: number; - /** The report data */ report?: Report; @@ -434,7 +432,6 @@ type TransactionGroupListItemProps = ListItemProps; accountID?: number; columns?: SearchColumnType[]; newTransactionID?: string; diff --git a/src/components/Search/SearchList/index.tsx b/src/components/Search/SearchList/index.tsx index df4cff50cd2f..09ee7cbf950d 100644 --- a/src/components/Search/SearchList/index.tsx +++ b/src/components/Search/SearchList/index.tsx @@ -229,7 +229,7 @@ function SearchList({ const styles = useThemeStyles(); const expensifyIcons = useMemoizedLazyExpensifyIcons(['CheckSquare']); - const {hash, groupBy, type} = queryJSON; + const {groupBy, type} = queryJSON; const flattenedItems = useMemo(() => { if (groupBy || type === CONST.SEARCH.DATA_TYPES.EXPENSE_REPORT) { if (!isTransactionGroupListItemArray(data)) { @@ -299,8 +299,6 @@ function SearchList({ const [isModalVisible, setIsModalVisible] = useState(false); const [longPressedItem, setLongPressedItem] = useState(); - const [policies] = useOnyx(ONYXKEYS.COLLECTION.POLICY); - const hasItemsBeingRemoved = prevDataLength && prevDataLength > data.length; const personalDetails = usePersonalDetails(); @@ -445,9 +443,7 @@ function SearchList({ onSelectionButtonPress={onCheckboxPress} canSelectMultiple={canSelectMultiple} item={itemWithSelection} - queryJSONHash={hash} columns={columns} - policies={policies} policyForMovingExpenses={policyForMovingExpenses} isDisabled={isDisabled} groupBy={groupBy} @@ -485,9 +481,7 @@ function SearchList({ handleLongPressRow, onCheckboxPress, canSelectMultiple, - hash, columns, - policies, personalDetails, userBillingFundID, isOffline,