diff --git a/src/components/Search.tsx b/src/components/Search.tsx index 83357137e65..0e55fb5edc2 100644 --- a/src/components/Search.tsx +++ b/src/components/Search.tsx @@ -19,15 +19,15 @@ import TableListItemSkeleton from './Skeletons/TableListItemSkeleton'; type SearchProps = { query: string; - policyID?: string; + policyIDs?: string; }; -function Search({query, policyID}: SearchProps) { +function Search({query, policyIDs}: SearchProps) { const {isOffline} = useNetwork(); const styles = useThemeStyles(); useCustomBackHandler(); - const hash = SearchUtils.getQueryHash(query, policyID); + const hash = SearchUtils.getQueryHash(query, policyIDs); const [searchResults, searchResultsMeta] = useOnyx(`${ONYXKEYS.COLLECTION.SNAPSHOT}${hash}`); useEffect(() => { @@ -35,7 +35,7 @@ function Search({query, policyID}: SearchProps) { return; } - SearchActions.search(hash, query, policyID); + SearchActions.search(hash, query, policyIDs); // eslint-disable-next-line react-hooks/exhaustive-deps }, [hash, isOffline]); diff --git a/src/libs/API/parameters/Search.ts b/src/libs/API/parameters/Search.ts index c6547745023..aa8671de8dc 100644 --- a/src/libs/API/parameters/Search.ts +++ b/src/libs/API/parameters/Search.ts @@ -1,6 +1,6 @@ type SearchParams = { query: string; - policyID?: string; + policyIDs?: string; hash: number; }; diff --git a/src/libs/actions/Search.ts b/src/libs/actions/Search.ts index 247a24fbc13..6b394f1c890 100644 --- a/src/libs/actions/Search.ts +++ b/src/libs/actions/Search.ts @@ -1,8 +1,8 @@ import * as API from '@libs/API'; import {READ_COMMANDS} from '@libs/API/types'; -function search(hash: number, query: string, policyID?: string) { - API.read(READ_COMMANDS.SEARCH, {hash, query, policyID}); +function search(hash: number, query: string, policyIDs?: string) { + API.read(READ_COMMANDS.SEARCH, {hash, query, policyIDs}); } export { diff --git a/src/pages/Search/SearchPage.tsx b/src/pages/Search/SearchPage.tsx index e838899befa..bc36b7bd2d2 100644 --- a/src/pages/Search/SearchPage.tsx +++ b/src/pages/Search/SearchPage.tsx @@ -53,7 +53,7 @@ function SearchPage({route}: SearchPageProps) { shouldShowBackButton={false} /> diff --git a/src/pages/Search/SearchPageBottomTab.tsx b/src/pages/Search/SearchPageBottomTab.tsx index 4391b74a00c..f26f5db300d 100644 --- a/src/pages/Search/SearchPageBottomTab.tsx +++ b/src/pages/Search/SearchPageBottomTab.tsx @@ -44,7 +44,7 @@ function SearchPageBottomTab() { {isSmallScreenWidth && ( )}