@sledge-app/react-instant-search 2.0.55 → 2.0.56
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.
|
@@ -9631,7 +9631,7 @@ const SearchResultWidget = (props) => {
|
|
|
9631
9631
|
searchParams2.set(queryKeyword, value);
|
|
9632
9632
|
setKeyword(value);
|
|
9633
9633
|
if (!objectPresent(previewSettings))
|
|
9634
|
-
window.history.
|
|
9634
|
+
window.history.replaceState(null, "", `${document.location.pathname}?${searchParams2.toString()}`);
|
|
9635
9635
|
}, []);
|
|
9636
9636
|
const initStates = () => {
|
|
9637
9637
|
const INSTANT_SEARCH_SETTING = instantSearchPreviewSettings || JSON.parse(localStorage.getItem(LOCAL_STORAGE_KEY.INSTANT_SEARCH_SETTING) || null);
|
|
@@ -10277,14 +10277,14 @@ const ResultProduct = React__default.memo((props) => {
|
|
|
10277
10277
|
...facetQueryStringObject
|
|
10278
10278
|
}).toString();
|
|
10279
10279
|
if (!objectPresent(previewSettings))
|
|
10280
|
-
window.history.
|
|
10280
|
+
window.history.replaceState(null, "", `${document.location.pathname}${(newQueryString == null ? void 0 : newQueryString.length) ? `?${newQueryString}` : ""}`);
|
|
10281
10281
|
};
|
|
10282
10282
|
const handleChangeSort = React__default.useCallback((value) => {
|
|
10283
10283
|
const searchParams2 = new URLSearchParams(document.location.search);
|
|
10284
10284
|
searchParams2.set(querySortBy, value);
|
|
10285
10285
|
setClickedSortId(value);
|
|
10286
10286
|
if (!objectPresent(previewSettings))
|
|
10287
|
-
window.history.
|
|
10287
|
+
window.history.replaceState(null, "", `${document.location.pathname}?${searchParams2.toString()}`);
|
|
10288
10288
|
}, []);
|
|
10289
10289
|
const handleChangeLimit = React__default.useCallback((value) => {
|
|
10290
10290
|
const searchParams2 = new URLSearchParams(document.location.search);
|
|
@@ -10292,7 +10292,7 @@ const ResultProduct = React__default.memo((props) => {
|
|
|
10292
10292
|
setClickedLimitId(Number(value));
|
|
10293
10293
|
localStorage == null ? void 0 : localStorage.setItem(LOCAL_STORAGE_KEY.LIMIT_PRODUCT, value);
|
|
10294
10294
|
if (!objectPresent(previewSettings))
|
|
10295
|
-
window.history.
|
|
10295
|
+
window.history.replaceState(null, "", `${document.location.pathname}?${searchParams2.toString()}`);
|
|
10296
10296
|
}, []);
|
|
10297
10297
|
const handleOpenFilterVertical = React__default.useCallback(
|
|
10298
10298
|
(id) => {
|
|
@@ -10517,12 +10517,12 @@ const ResultProduct = React__default.memo((props) => {
|
|
|
10517
10517
|
searchParams2.set(queryPage, String(1));
|
|
10518
10518
|
searchParams2.set(queryLimit, String(clickedLimitId));
|
|
10519
10519
|
if (!objectPresent(previewSettings))
|
|
10520
|
-
window.history.
|
|
10520
|
+
window.history.replaceState(null, "", `${document.location.pathname}?${searchParams2.toString()}`);
|
|
10521
10521
|
} else {
|
|
10522
10522
|
if (!isLimitIdAvailable) {
|
|
10523
10523
|
searchParams2.set(queryLimit, String(valueDefaultLimit));
|
|
10524
10524
|
if (!objectPresent(previewSettings))
|
|
10525
|
-
window.history.
|
|
10525
|
+
window.history.replaceState(null, "", `${document.location.pathname}?${searchParams2.toString()}`);
|
|
10526
10526
|
}
|
|
10527
10527
|
}
|
|
10528
10528
|
setIsLoading(isReplaceData ? true : !isLoadMore2);
|
|
@@ -10582,7 +10582,7 @@ const ResultProduct = React__default.memo((props) => {
|
|
|
10582
10582
|
});
|
|
10583
10583
|
}, 200);
|
|
10584
10584
|
if (!objectPresent(previewSettings))
|
|
10585
|
-
window.history.
|
|
10585
|
+
window.history.replaceState(null, "", `${document.location.pathname}?${searchParams2.toString()}`);
|
|
10586
10586
|
};
|
|
10587
10587
|
React__default.useEffect(() => {
|
|
10588
10588
|
var _a2, _b2, _c2, _d2;
|