Skip to content

Commit

Permalink
fix: set searching state when calling pagination (#433)
Browse files Browse the repository at this point in the history
Co-authored-by: Sam Potts <[email protected]>
  • Loading branch information
tuanddd and sampotts authored Mar 9, 2021
1 parent 35a13bc commit 18c7843
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/chatty-pears-serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sajari/react-hooks': patch
---

Set searching state when calling pagination request
1 change: 1 addition & 0 deletions packages/hooks/src/ContextProvider/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ const ContextProvider: React.FC<SearchProviderValues> = ({
const { config } = searchState;

variables.set({ [config.pageParam]: String(page) });
setSearching(true);
pipeline.search(variables.get());
},
[search.pipeline, search.variables, searchState.config],
Expand Down

0 comments on commit 18c7843

Please sign in to comment.