@sledge-app/react-instant-search 1.0.129 → 1.0.130

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8076,25 +8076,28 @@ const ResultProduct = React__default.memo((props) => {
8076
8076
  ...props2
8077
8077
  });
8078
8078
  };
8079
- const handlePageChange = React__default.useCallback((page) => {
8080
- const searchParams2 = new URLSearchParams(document.location.search);
8081
- searchParams2.set(queryPage, String(page));
8082
- searchParams2.set(queryLimit, String(clickedLimitId));
8083
- setCurrentPage(page);
8084
- setIsReplaceWidgetList == null ? void 0 : setIsReplaceWidgetList(true);
8085
- setTimeout(() => {
8086
- scrollToElement({
8087
- element: searchResultContainerRef.current,
8088
- headerOffset: 50
8089
- });
8090
- }, 200);
8091
- window.history.pushState(null, "", `${document.location.pathname}?${searchParams2.toString()}`);
8092
- }, []);
8079
+ const handlePageChange = React__default.useCallback(
8080
+ (page) => {
8081
+ const searchParams2 = new URLSearchParams(document.location.search);
8082
+ searchParams2.set(queryPage, String(page));
8083
+ searchParams2.set(queryLimit, String(clickedLimitId));
8084
+ setCurrentPage(page);
8085
+ setIsReplaceWidgetList == null ? void 0 : setIsReplaceWidgetList(true);
8086
+ setTimeout(() => {
8087
+ scrollToElement({
8088
+ element: searchResultContainerRef.current,
8089
+ headerOffset: 50
8090
+ });
8091
+ }, 200);
8092
+ window.history.pushState(null, "", `${document.location.pathname}?${searchParams2.toString()}`);
8093
+ },
8094
+ [clickedLimitId, searchResultContainerRef]
8095
+ );
8093
8096
  const handleLoadMore = React__default.useCallback(() => {
8094
8097
  setCurrentPage(currentPage + 1);
8095
8098
  setIsLoadingButtonLoadMore(true);
8096
8099
  setIsReplaceWidgetList == null ? void 0 : setIsReplaceWidgetList(true);
8097
- }, []);
8100
+ }, [currentPage]);
8098
8101
  React__default.useEffect(() => {
8099
8102
  var _a2, _b2, _c2, _d2;
8100
8103
  if (typeof window !== "undefined") {