diff --git a/.changeset/chatty-pears-serve.md b/.changeset/chatty-pears-serve.md new file mode 100644 index 000000000..6903e909d --- /dev/null +++ b/.changeset/chatty-pears-serve.md @@ -0,0 +1,5 @@ +--- +'@sajari/react-hooks': patch +--- + +Set searching state when calling pagination request diff --git a/packages/hooks/src/ContextProvider/index.tsx b/packages/hooks/src/ContextProvider/index.tsx index 492e1fbf4..fc1a07544 100644 --- a/packages/hooks/src/ContextProvider/index.tsx +++ b/packages/hooks/src/ContextProvider/index.tsx @@ -296,6 +296,7 @@ const ContextProvider: React.FC = ({ const { config } = searchState; variables.set({ [config.pageParam]: String(page) }); + setSearching(true); pipeline.search(variables.get()); }, [search.pipeline, search.variables, searchState.config],