@sledge-app/react-instant-search 0.0.86 → 0.0.87
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.
- package/dist/components/SearchResultWidget/SearchResultWidget.d.ts.map +1 -1
- package/dist/sledge-react-instant-search.cjs +1 -1
- package/dist/sledge-react-instant-search.cjs.map +1 -1
- package/dist/sledge-react-instant-search.js +3 -2
- package/dist/sledge-react-instant-search.js.map +1 -1
- package/package.json +1 -1
|
@@ -2699,6 +2699,7 @@ const SearchIconWidgetPopup = () => {
|
|
|
2699
2699
|
const SearchResultWidget = (props) => {
|
|
2700
2700
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
|
|
2701
2701
|
const { isRenderApp, isJsVersion } = React__default.useContext(SledgeContext);
|
|
2702
|
+
const { instantSearch: isRenderAppInstantSearch } = isRenderApp || {};
|
|
2702
2703
|
const { layoutType = "default", query, params, children, onAfterAddToCart, onAfterAddWishlist, onAfterRemoveWishlist, onAfterRenderProduct, data: propsData, sledgeSettings } = props;
|
|
2703
2704
|
const { keyword: queryKeyword = "" } = query || {};
|
|
2704
2705
|
const { collectionId } = params || {};
|
|
@@ -2862,12 +2863,12 @@ const SearchResultWidget = (props) => {
|
|
|
2862
2863
|
await handleInitStates(response, "totalDataPerIndex");
|
|
2863
2864
|
};
|
|
2864
2865
|
React__default.useEffect(() => {
|
|
2865
|
-
if (!
|
|
2866
|
+
if (!isRenderAppInstantSearch)
|
|
2866
2867
|
return;
|
|
2867
2868
|
const searchParams2 = new URLSearchParams(document.location.search);
|
|
2868
2869
|
setKeyword((searchParams2 == null ? void 0 : searchParams2.get(queryKeyword)) || "");
|
|
2869
2870
|
handleSettings(localStorage.getItem(LOCAL_STORAGE_KEY.INSTANT_SEARCH_SETTING) || "");
|
|
2870
|
-
}, [
|
|
2871
|
+
}, [isRenderAppInstantSearch]);
|
|
2871
2872
|
React__default.useEffect(() => {
|
|
2872
2873
|
if (Boolean(previousState && (previousState == null ? void 0 : previousState.keyword) !== keyword) && layoutType === "default") {
|
|
2873
2874
|
const INSTANT_SEARCH_SETTING = JSON.parse(localStorage.getItem(LOCAL_STORAGE_KEY.INSTANT_SEARCH_SETTING) || "");
|