Skip to content

Commit

Permalink
fix param order
Browse files Browse the repository at this point in the history
  • Loading branch information
luacmartins committed May 14, 2024
1 parent 5eae449 commit 0677a8a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function Search({query, policyIDs}: SearchProps) {
return;
}

SearchActions.search(hash, query, policyIDs);
SearchActions.search(hash, query, 0, policyIDs);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [hash, isOffline]);

Expand Down Expand Up @@ -65,7 +65,7 @@ function Search({query, policyIDs}: SearchProps) {
return;
}
const currentOffset = searchResults?.search?.offset ?? 0;
SearchActions.search(query, currentOffset + CONST.SEARCH_RESULTS_PAGE_SIZE);
SearchActions.search(hash, query, currentOffset + CONST.SEARCH_RESULTS_PAGE_SIZE);
};

const type = SearchUtils.getSearchType(searchResults?.search);
Expand Down
2 changes: 1 addition & 1 deletion src/libs/actions/Search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as API from '@libs/API';
import {READ_COMMANDS} from '@libs/API/types';
import ONYXKEYS from '@src/ONYXKEYS';

function search(hash: number, query: string, offset = 0, policyIDs?: string, ) {
function search(hash: number, query: string, offset = 0, policyIDs?: string) {
const optimisticData: OnyxUpdate[] = [
{
onyxMethod: Onyx.METHOD.MERGE,
Expand Down

0 comments on commit 0677a8a

Please sign in to comment.