@sledge-app/react-instant-search 0.0.82 → 0.0.83
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
|
@@ -2738,7 +2738,7 @@ const SearchResultWidget = (props) => {
|
|
|
2738
2738
|
const [showOutOfStock, setShowOutOfStock] = React__default.useState((_i = sledgeSettings == null ? void 0 : sledgeSettings.instantsearch) == null ? void 0 : _i.show_out_of_stock);
|
|
2739
2739
|
const [initStatesFirstTime, setInitStatesFirstTime] = React__default.useState(true);
|
|
2740
2740
|
const searchResultContainerRef = React__default.useRef(null);
|
|
2741
|
-
const previousState = usePrevious({ keyword });
|
|
2741
|
+
const previousState = usePrevious({ keyword, isRenderApp });
|
|
2742
2742
|
const handleChangeTabIndex = (id, name, e) => {
|
|
2743
2743
|
setClickedTabIndexId(id);
|
|
2744
2744
|
setClickedTabIndexName(name);
|
|
@@ -2843,7 +2843,6 @@ const SearchResultWidget = (props) => {
|
|
|
2843
2843
|
}
|
|
2844
2844
|
};
|
|
2845
2845
|
const handleSettings = async (LOCAL_STORAGE_INSTANT_SEARCH_SETTING) => {
|
|
2846
|
-
console.log("handleSettings running");
|
|
2847
2846
|
setIsLoadingSetting(true);
|
|
2848
2847
|
let response;
|
|
2849
2848
|
let getFirstIndex;
|
|
@@ -2869,6 +2868,8 @@ const SearchResultWidget = (props) => {
|
|
|
2869
2868
|
await handleInitStates(response, "totalDataPerIndex");
|
|
2870
2869
|
};
|
|
2871
2870
|
React__default.useEffect(() => {
|
|
2871
|
+
console.log("useEffect running");
|
|
2872
|
+
console.log("previousState", previousState);
|
|
2872
2873
|
if (!(isRenderApp == null ? void 0 : isRenderApp.instantSearch))
|
|
2873
2874
|
return;
|
|
2874
2875
|
const searchParams2 = new URLSearchParams(document.location.search);
|