From 7d7ba3cc88f7a824ebbc30478073f0785315c4df Mon Sep 17 00:00:00 2001 From: MelvinBot Date: Fri, 20 Feb 2026 15:39:42 +0000 Subject: [PATCH 1/4] Fix To-do search results disappearing when sort column is clicked Use similarSearchHash instead of primaryHash in isTodoSearch to determine whether to use live Onyx data for To-do searches. The primaryHash includes sortBy/sortOrder, so changing sort caused the hash to no longer match the suggested To-do search hashes, making shouldUseLiveData flip to false and falling back to an empty API snapshot. Co-authored-by: Carlos Martins --- src/components/Search/SearchContext.tsx | 10 ++++++---- src/components/Search/index.tsx | 4 ++-- src/components/Search/types.ts | 3 ++- src/libs/SearchUIUtils.ts | 4 ++-- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/components/Search/SearchContext.tsx b/src/components/Search/SearchContext.tsx index f571b9370e687..14b369d88a001 100644 --- a/src/components/Search/SearchContext.tsx +++ b/src/components/Search/SearchContext.tsx @@ -32,6 +32,7 @@ const defaultSearchInfo: SearchResultsInfo = { const defaultSearchContextData: SearchContextData = { currentSearchHash: -1, + currentSimilarSearchHash: -1, currentSearchKey: undefined, currentSearchQueryJSON: undefined, currentSearchResults: undefined, @@ -81,10 +82,10 @@ function SearchContextProvider({children}: ChildrenProps) { const todoSearchResultsData = useTodos(); const currentSearchKey = searchContextData.currentSearchKey; - const currentSearchHash = searchContextData.currentSearchHash; + const currentSimilarSearchHash = searchContextData.currentSimilarSearchHash; const {accountID} = useCurrentUserPersonalDetails(); const suggestedSearches = useMemo(() => getSuggestedSearches(accountID), [accountID]); - const shouldUseLiveData = !!currentSearchKey && isTodoSearch(currentSearchHash, suggestedSearches); + const shouldUseLiveData = !!currentSearchKey && isTodoSearch(currentSimilarSearchHash, suggestedSearches); // If viewing a to-do search, use live data from useTodos, otherwise return the snapshot data // We do this so that we can show the counters for the to-do search results without visiting the specific to-do page, e.g. show `Approve [3]` while viewing the `Submit` to-do search. @@ -109,15 +110,16 @@ function SearchContextProvider({children}: ChildrenProps) { return snapshotSearchResults ?? undefined; }, [shouldUseLiveData, currentSearchKey, todoSearchResultsData, snapshotSearchResults]); - const setCurrentSearchHashAndKey = useCallback((searchHash: number, searchKey: SearchKey | undefined) => { + const setCurrentSearchHashAndKey = useCallback((searchHash: number, similarHash: number, searchKey: SearchKey | undefined) => { setSearchContextData((prevState) => { - if (searchHash === prevState.currentSearchHash && searchKey === prevState.currentSearchKey) { + if (searchHash === prevState.currentSearchHash && similarHash === prevState.currentSimilarSearchHash && searchKey === prevState.currentSearchKey) { return prevState; } return { ...prevState, currentSearchHash: searchHash, + currentSimilarSearchHash: similarHash, currentSearchKey: searchKey, }; }); diff --git a/src/components/Search/index.tsx b/src/components/Search/index.tsx index 876c8b137cc6a..a9c742ecd7f75 100644 --- a/src/components/Search/index.tsx +++ b/src/components/Search/index.tsx @@ -307,9 +307,9 @@ function Search({ const clearTransactionsAndSetHashAndKey = useCallback(() => { clearSelectedTransactions(hash); - setCurrentSearchHashAndKey(hash, searchKey); + setCurrentSearchHashAndKey(hash, similarSearchHash, searchKey); setCurrentSearchQueryJSON(queryJSON); - }, [hash, searchKey, clearSelectedTransactions, setCurrentSearchHashAndKey, setCurrentSearchQueryJSON, queryJSON]); + }, [hash, similarSearchHash, searchKey, clearSelectedTransactions, setCurrentSearchHashAndKey, setCurrentSearchQueryJSON, queryJSON]); useFocusEffect(clearTransactionsAndSetHashAndKey); diff --git a/src/components/Search/types.ts b/src/components/Search/types.ts index e671df62f8d50..f1d9ff52b5daa 100644 --- a/src/components/Search/types.ts +++ b/src/components/Search/types.ts @@ -153,6 +153,7 @@ type SearchCustomColumnIds = type SearchContextData = { currentSearchHash: number; + currentSimilarSearchHash: number; currentSearchKey: SearchKey | undefined; currentSearchQueryJSON: SearchQueryJSON | undefined; currentSearchResults: SearchResults | undefined; @@ -168,7 +169,7 @@ type SearchContextProps = SearchContextData & { currentSearchResults: SearchResults | undefined; /** Whether we're on a main to-do search and should use live Onyx data instead of snapshots */ shouldUseLiveData: boolean; - setCurrentSearchHashAndKey: (hash: number, key: SearchKey | undefined) => void; + setCurrentSearchHashAndKey: (hash: number, similarHash: number, key: SearchKey | undefined) => void; setCurrentSearchQueryJSON: (searchQueryJSON: SearchQueryJSON | undefined) => void; /** If you want to set `selectedTransactionIDs`, pass an array as the first argument, object/record otherwise */ setSelectedTransactions: { diff --git a/src/libs/SearchUIUtils.ts b/src/libs/SearchUIUtils.ts index 6733d90689bad..94213adca5f00 100644 --- a/src/libs/SearchUIUtils.ts +++ b/src/libs/SearchUIUtils.ts @@ -3411,9 +3411,9 @@ function isCorrectSearchUserName(displayName?: string) { return displayName && displayName.toUpperCase() !== CONST.REPORT.OWNER_EMAIL_FAKE; } -function isTodoSearch(hash: number, suggestedSearches: Record) { +function isTodoSearch(similarSearchHash: number, suggestedSearches: Record) { const TODO_KEYS: SearchKey[] = [CONST.SEARCH.SEARCH_KEYS.SUBMIT, CONST.SEARCH.SEARCH_KEYS.APPROVE, CONST.SEARCH.SEARCH_KEYS.PAY, CONST.SEARCH.SEARCH_KEYS.EXPORT]; - const matchedSearchKey = Object.values(suggestedSearches).find((search) => search.hash === hash)?.key; + const matchedSearchKey = Object.values(suggestedSearches).find((search) => search.similarSearchHash === similarSearchHash)?.key; return !!matchedSearchKey && TODO_KEYS.includes(matchedSearchKey); } From 7ffaf73754204a1bfcf2f7dc502193caf9408bf5 Mon Sep 17 00:00:00 2001 From: MelvinBot Date: Fri, 20 Feb 2026 15:52:06 +0000 Subject: [PATCH 2/4] Add missing currentSimilarSearchHash to test mock contexts Co-authored-by: Carlos Martins --- tests/ui/CategoryListItemHeaderTest.tsx | 1 + tests/ui/MerchantListItemHeaderTest.tsx | 1 + tests/ui/MonthListItemHeaderTest.tsx | 1 + tests/ui/ReportListItemHeaderTest.tsx | 1 + tests/ui/WeekListItemHeaderTest.tsx | 1 + tests/ui/YearListItemHeaderTest.tsx | 1 + 6 files changed, 6 insertions(+) diff --git a/tests/ui/CategoryListItemHeaderTest.tsx b/tests/ui/CategoryListItemHeaderTest.tsx index 1657eb6aa23d0..be5bdc49cd9cc 100644 --- a/tests/ui/CategoryListItemHeaderTest.tsx +++ b/tests/ui/CategoryListItemHeaderTest.tsx @@ -23,6 +23,7 @@ const mockedUseResponsiveLayout = useResponsiveLayout as jest.MockedFunction Date: Sat, 21 Feb 2026 09:20:07 +0000 Subject: [PATCH 3/4] Use recentSearchHash instead of similarSearchHash for todo search matching similarSearchHash strips filter values, so custom searches like `action:approve to:` would collide with the canned Approve search and incorrectly trigger live data mode. recentSearchHash includes all filter values but still excludes sortBy/sortOrder/columns/limit, fixing the original sort-column bug without introducing false matches. Co-authored-by: Carlos Martins --- src/components/Search/SearchContext.tsx | 12 +++---- src/components/Search/index.tsx | 8 ++--- src/components/Search/types.ts | 4 +-- src/libs/SearchUIUtils.ts | 47 +++++++++++++++++++++++-- tests/ui/CategoryListItemHeaderTest.tsx | 2 +- tests/ui/MerchantListItemHeaderTest.tsx | 2 +- tests/ui/MonthListItemHeaderTest.tsx | 2 +- tests/ui/ReportListItemHeaderTest.tsx | 2 +- tests/ui/WeekListItemHeaderTest.tsx | 2 +- tests/ui/YearListItemHeaderTest.tsx | 2 +- 10 files changed, 63 insertions(+), 20 deletions(-) diff --git a/src/components/Search/SearchContext.tsx b/src/components/Search/SearchContext.tsx index 14b369d88a001..8d0bf92772402 100644 --- a/src/components/Search/SearchContext.tsx +++ b/src/components/Search/SearchContext.tsx @@ -32,7 +32,7 @@ const defaultSearchInfo: SearchResultsInfo = { const defaultSearchContextData: SearchContextData = { currentSearchHash: -1, - currentSimilarSearchHash: -1, + currentRecentSearchHash: -1, currentSearchKey: undefined, currentSearchQueryJSON: undefined, currentSearchResults: undefined, @@ -82,10 +82,10 @@ function SearchContextProvider({children}: ChildrenProps) { const todoSearchResultsData = useTodos(); const currentSearchKey = searchContextData.currentSearchKey; - const currentSimilarSearchHash = searchContextData.currentSimilarSearchHash; + const currentRecentSearchHash = searchContextData.currentRecentSearchHash; const {accountID} = useCurrentUserPersonalDetails(); const suggestedSearches = useMemo(() => getSuggestedSearches(accountID), [accountID]); - const shouldUseLiveData = !!currentSearchKey && isTodoSearch(currentSimilarSearchHash, suggestedSearches); + const shouldUseLiveData = !!currentSearchKey && isTodoSearch(currentRecentSearchHash, suggestedSearches); // If viewing a to-do search, use live data from useTodos, otherwise return the snapshot data // We do this so that we can show the counters for the to-do search results without visiting the specific to-do page, e.g. show `Approve [3]` while viewing the `Submit` to-do search. @@ -110,16 +110,16 @@ function SearchContextProvider({children}: ChildrenProps) { return snapshotSearchResults ?? undefined; }, [shouldUseLiveData, currentSearchKey, todoSearchResultsData, snapshotSearchResults]); - const setCurrentSearchHashAndKey = useCallback((searchHash: number, similarHash: number, searchKey: SearchKey | undefined) => { + const setCurrentSearchHashAndKey = useCallback((searchHash: number, recentHash: number, searchKey: SearchKey | undefined) => { setSearchContextData((prevState) => { - if (searchHash === prevState.currentSearchHash && similarHash === prevState.currentSimilarSearchHash && searchKey === prevState.currentSearchKey) { + if (searchHash === prevState.currentSearchHash && recentHash === prevState.currentRecentSearchHash && searchKey === prevState.currentSearchKey) { return prevState; } return { ...prevState, currentSearchHash: searchHash, - currentSimilarSearchHash: similarHash, + currentRecentSearchHash: recentHash, currentSearchKey: searchKey, }; }); diff --git a/src/components/Search/index.tsx b/src/components/Search/index.tsx index a9c742ecd7f75..d94a694ef89f9 100644 --- a/src/components/Search/index.tsx +++ b/src/components/Search/index.tsx @@ -213,7 +213,7 @@ function Search({ searchRequestResponseStatusCode, onDEWModalOpen, }: SearchProps) { - const {type, status, sortBy, sortOrder, hash, similarSearchHash, groupBy, view} = queryJSON; + const {type, status, sortBy, sortOrder, hash, recentSearchHash, similarSearchHash, groupBy, view} = queryJSON; const {isOffline} = useNetwork(); const prevIsOffline = usePrevious(isOffline); @@ -276,7 +276,7 @@ function Search({ const {defaultCardFeed} = useCardFeedsForDisplay(); const suggestedSearches = useMemo(() => getSuggestedSearches(accountID, defaultCardFeed?.id), [defaultCardFeed?.id, accountID]); - const searchKey = useMemo(() => Object.values(suggestedSearches).find((search) => search.similarSearchHash === similarSearchHash)?.key, [suggestedSearches, similarSearchHash]); + const searchKey = useMemo(() => Object.values(suggestedSearches).find((search) => search.recentSearchHash === recentSearchHash)?.key, [suggestedSearches, recentSearchHash]); const searchDataType = useMemo(() => (shouldUseLiveData ? CONST.SEARCH.DATA_TYPES.EXPENSE_REPORT : searchResults?.search?.type), [shouldUseLiveData, searchResults?.search?.type]); const shouldCalculateTotals = useSearchShouldCalculateTotals(searchKey, hash, offset === 0); @@ -307,9 +307,9 @@ function Search({ const clearTransactionsAndSetHashAndKey = useCallback(() => { clearSelectedTransactions(hash); - setCurrentSearchHashAndKey(hash, similarSearchHash, searchKey); + setCurrentSearchHashAndKey(hash, recentSearchHash, searchKey); setCurrentSearchQueryJSON(queryJSON); - }, [hash, similarSearchHash, searchKey, clearSelectedTransactions, setCurrentSearchHashAndKey, setCurrentSearchQueryJSON, queryJSON]); + }, [hash, recentSearchHash, searchKey, clearSelectedTransactions, setCurrentSearchHashAndKey, setCurrentSearchQueryJSON, queryJSON]); useFocusEffect(clearTransactionsAndSetHashAndKey); diff --git a/src/components/Search/types.ts b/src/components/Search/types.ts index f1d9ff52b5daa..011a6d7942601 100644 --- a/src/components/Search/types.ts +++ b/src/components/Search/types.ts @@ -153,7 +153,7 @@ type SearchCustomColumnIds = type SearchContextData = { currentSearchHash: number; - currentSimilarSearchHash: number; + currentRecentSearchHash: number; currentSearchKey: SearchKey | undefined; currentSearchQueryJSON: SearchQueryJSON | undefined; currentSearchResults: SearchResults | undefined; @@ -169,7 +169,7 @@ type SearchContextProps = SearchContextData & { currentSearchResults: SearchResults | undefined; /** Whether we're on a main to-do search and should use live Onyx data instead of snapshots */ shouldUseLiveData: boolean; - setCurrentSearchHashAndKey: (hash: number, similarHash: number, key: SearchKey | undefined) => void; + setCurrentSearchHashAndKey: (hash: number, recentHash: number, key: SearchKey | undefined) => void; setCurrentSearchQueryJSON: (searchQueryJSON: SearchQueryJSON | undefined) => void; /** If you want to set `selectedTransactionIDs`, pass an array as the first argument, object/record otherwise */ setSelectedTransactions: { diff --git a/src/libs/SearchUIUtils.ts b/src/libs/SearchUIUtils.ts index 94213adca5f00..b766f9a013d2f 100644 --- a/src/libs/SearchUIUtils.ts +++ b/src/libs/SearchUIUtils.ts @@ -445,6 +445,7 @@ type SearchTypeMenuItem = { searchQueryJSON: SearchQueryJSON | undefined; hash: number; similarSearchHash: number; + recentSearchHash: number; badgeText?: string; emptyState?: { title: TranslationPaths; @@ -528,6 +529,9 @@ function createTopSearchMenuItem( get similarSearchHash() { return this.searchQueryJSON?.similarSearchHash ?? CONST.DEFAULT_NUMBER_ID; }, + get recentSearchHash() { + return this.searchQueryJSON?.recentSearchHash ?? CONST.DEFAULT_NUMBER_ID; + }, }; } @@ -566,6 +570,9 @@ function getSuggestedSearches( get similarSearchHash() { return this.searchQueryJSON?.similarSearchHash ?? CONST.DEFAULT_NUMBER_ID; }, + get recentSearchHash() { + return this.searchQueryJSON?.recentSearchHash ?? CONST.DEFAULT_NUMBER_ID; + }, }, [CONST.SEARCH.SEARCH_KEYS.REPORTS]: { key: CONST.SEARCH.SEARCH_KEYS.REPORTS, @@ -582,6 +589,9 @@ function getSuggestedSearches( get similarSearchHash() { return this.searchQueryJSON?.similarSearchHash ?? CONST.DEFAULT_NUMBER_ID; }, + get recentSearchHash() { + return this.searchQueryJSON?.recentSearchHash ?? CONST.DEFAULT_NUMBER_ID; + }, }, [CONST.SEARCH.SEARCH_KEYS.CHATS]: { key: CONST.SEARCH.SEARCH_KEYS.CHATS, @@ -598,6 +608,9 @@ function getSuggestedSearches( get similarSearchHash() { return this.searchQueryJSON?.similarSearchHash ?? CONST.DEFAULT_NUMBER_ID; }, + get recentSearchHash() { + return this.searchQueryJSON?.recentSearchHash ?? CONST.DEFAULT_NUMBER_ID; + }, }, [CONST.SEARCH.SEARCH_KEYS.SUBMIT]: { key: CONST.SEARCH.SEARCH_KEYS.SUBMIT, @@ -618,6 +631,9 @@ function getSuggestedSearches( get similarSearchHash() { return this.searchQueryJSON?.similarSearchHash ?? CONST.DEFAULT_NUMBER_ID; }, + get recentSearchHash() { + return this.searchQueryJSON?.recentSearchHash ?? CONST.DEFAULT_NUMBER_ID; + }, }, [CONST.SEARCH.SEARCH_KEYS.APPROVE]: { key: CONST.SEARCH.SEARCH_KEYS.APPROVE, @@ -638,6 +654,9 @@ function getSuggestedSearches( get similarSearchHash() { return this.searchQueryJSON?.similarSearchHash ?? CONST.DEFAULT_NUMBER_ID; }, + get recentSearchHash() { + return this.searchQueryJSON?.recentSearchHash ?? CONST.DEFAULT_NUMBER_ID; + }, }, [CONST.SEARCH.SEARCH_KEYS.PAY]: { key: CONST.SEARCH.SEARCH_KEYS.PAY, @@ -659,6 +678,9 @@ function getSuggestedSearches( get similarSearchHash() { return this.searchQueryJSON?.similarSearchHash ?? CONST.DEFAULT_NUMBER_ID; }, + get recentSearchHash() { + return this.searchQueryJSON?.recentSearchHash ?? CONST.DEFAULT_NUMBER_ID; + }, }, [CONST.SEARCH.SEARCH_KEYS.EXPORT]: { key: CONST.SEARCH.SEARCH_KEYS.EXPORT, @@ -680,6 +702,9 @@ function getSuggestedSearches( get similarSearchHash() { return this.searchQueryJSON?.similarSearchHash ?? CONST.DEFAULT_NUMBER_ID; }, + get recentSearchHash() { + return this.searchQueryJSON?.recentSearchHash ?? CONST.DEFAULT_NUMBER_ID; + }, }, [CONST.SEARCH.SEARCH_KEYS.STATEMENTS]: { key: CONST.SEARCH.SEARCH_KEYS.STATEMENTS, @@ -701,6 +726,9 @@ function getSuggestedSearches( get similarSearchHash() { return this.searchQueryJSON?.similarSearchHash ?? CONST.DEFAULT_NUMBER_ID; }, + get recentSearchHash() { + return this.searchQueryJSON?.recentSearchHash ?? CONST.DEFAULT_NUMBER_ID; + }, }, [CONST.SEARCH.SEARCH_KEYS.UNAPPROVED_CASH]: { key: CONST.SEARCH.SEARCH_KEYS.UNAPPROVED_CASH, @@ -722,6 +750,9 @@ function getSuggestedSearches( get similarSearchHash() { return this.searchQueryJSON?.similarSearchHash ?? CONST.DEFAULT_NUMBER_ID; }, + get recentSearchHash() { + return this.searchQueryJSON?.recentSearchHash ?? CONST.DEFAULT_NUMBER_ID; + }, }, [CONST.SEARCH.SEARCH_KEYS.UNAPPROVED_CARD]: { key: CONST.SEARCH.SEARCH_KEYS.UNAPPROVED_CARD, @@ -743,6 +774,9 @@ function getSuggestedSearches( get similarSearchHash() { return this.searchQueryJSON?.similarSearchHash ?? CONST.DEFAULT_NUMBER_ID; }, + get recentSearchHash() { + return this.searchQueryJSON?.recentSearchHash ?? CONST.DEFAULT_NUMBER_ID; + }, }, [CONST.SEARCH.SEARCH_KEYS.RECONCILIATION]: { key: CONST.SEARCH.SEARCH_KEYS.RECONCILIATION, @@ -764,6 +798,9 @@ function getSuggestedSearches( get similarSearchHash() { return this.searchQueryJSON?.similarSearchHash ?? CONST.DEFAULT_NUMBER_ID; }, + get recentSearchHash() { + return this.searchQueryJSON?.recentSearchHash ?? CONST.DEFAULT_NUMBER_ID; + }, }, [CONST.SEARCH.SEARCH_KEYS.TOP_SPENDERS]: { key: CONST.SEARCH.SEARCH_KEYS.TOP_SPENDERS, @@ -797,6 +834,9 @@ function getSuggestedSearches( get similarSearchHash() { return this.searchQueryJSON?.similarSearchHash ?? CONST.DEFAULT_NUMBER_ID; }, + get recentSearchHash() { + return this.searchQueryJSON?.recentSearchHash ?? CONST.DEFAULT_NUMBER_ID; + }, }, [CONST.SEARCH.SEARCH_KEYS.TOP_CATEGORIES]: createTopSearchMenuItem( CONST.SEARCH.SEARCH_KEYS.TOP_CATEGORIES, @@ -839,6 +879,9 @@ function getSuggestedSearches( get similarSearchHash() { return this.searchQueryJSON?.similarSearchHash ?? CONST.DEFAULT_NUMBER_ID; }, + get recentSearchHash() { + return this.searchQueryJSON?.recentSearchHash ?? CONST.DEFAULT_NUMBER_ID; + }, }, }; } @@ -3411,9 +3454,9 @@ function isCorrectSearchUserName(displayName?: string) { return displayName && displayName.toUpperCase() !== CONST.REPORT.OWNER_EMAIL_FAKE; } -function isTodoSearch(similarSearchHash: number, suggestedSearches: Record) { +function isTodoSearch(recentSearchHash: number, suggestedSearches: Record) { const TODO_KEYS: SearchKey[] = [CONST.SEARCH.SEARCH_KEYS.SUBMIT, CONST.SEARCH.SEARCH_KEYS.APPROVE, CONST.SEARCH.SEARCH_KEYS.PAY, CONST.SEARCH.SEARCH_KEYS.EXPORT]; - const matchedSearchKey = Object.values(suggestedSearches).find((search) => search.similarSearchHash === similarSearchHash)?.key; + const matchedSearchKey = Object.values(suggestedSearches).find((search) => search.recentSearchHash === recentSearchHash)?.key; return !!matchedSearchKey && TODO_KEYS.includes(matchedSearchKey); } diff --git a/tests/ui/CategoryListItemHeaderTest.tsx b/tests/ui/CategoryListItemHeaderTest.tsx index be5bdc49cd9cc..6832cd8113c66 100644 --- a/tests/ui/CategoryListItemHeaderTest.tsx +++ b/tests/ui/CategoryListItemHeaderTest.tsx @@ -23,7 +23,7 @@ const mockedUseResponsiveLayout = useResponsiveLayout as jest.MockedFunction Date: Sat, 21 Feb 2026 09:29:06 +0000 Subject: [PATCH 4/4] Fix: Add missing recentSearchHash to test mocks The SearchTypeMenuItem type now requires recentSearchHash, but the test mocks in useSuggestedSearchDefaultNavigationTest were not updated. Co-authored-by: Carlos Martins --- tests/unit/hooks/useSuggestedSearchDefaultNavigationTest.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/unit/hooks/useSuggestedSearchDefaultNavigationTest.ts b/tests/unit/hooks/useSuggestedSearchDefaultNavigationTest.ts index 235bdca105103..28a8c7a5e8fe2 100644 --- a/tests/unit/hooks/useSuggestedSearchDefaultNavigationTest.ts +++ b/tests/unit/hooks/useSuggestedSearchDefaultNavigationTest.ts @@ -25,6 +25,7 @@ function createApproveMenuItem(): SearchTypeMenuItem { searchQueryJSON: undefined, hash: 1, similarSearchHash: 101, + recentSearchHash: 1001, }; } @@ -41,6 +42,7 @@ function createSubmitMenuItem(): SearchTypeMenuItem { searchQueryJSON: undefined, hash: 2, similarSearchHash: 202, + recentSearchHash: 2002, }; } @@ -56,6 +58,7 @@ function createExpenseMenuItem(): SearchTypeMenuItem { searchQueryJSON: undefined, hash: 3, similarSearchHash: 303, + recentSearchHash: 3003, }; } @@ -71,6 +74,7 @@ function createExpenseReportMenuItem(): SearchTypeMenuItem { searchQueryJSON: undefined, hash: 4, similarSearchHash: 404, + recentSearchHash: 4004, }; } @@ -86,6 +90,7 @@ function createChatMenuItem(): SearchTypeMenuItem { searchQueryJSON: undefined, hash: 5, similarSearchHash: 505, + recentSearchHash: 5005, }; }