@sledge-app/react-instant-search 0.0.72 → 0.0.74

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.
@@ -1159,7 +1159,7 @@ const Rating = (props) => {
1159
1159
  var _a;
1160
1160
  const { value, size = "md", params, withSkeletonLoading = true, isScrollToElementWidget = true, data: propsData } = props;
1161
1161
  const { productId } = params || {};
1162
- const { isRenderApp, triggerRenderMultipleComponent } = React__default.useContext(SledgeContext);
1162
+ const { isRenderApp } = React__default.useContext(SledgeContext);
1163
1163
  const [isFirstLoading, setIsFirstLoading] = React__default.useState(true);
1164
1164
  const [isLoading, setIsLoading] = React__default.useState(true);
1165
1165
  const [sizing, setSizing] = React__default.useState({
@@ -1252,7 +1252,7 @@ const Rating = (props) => {
1252
1252
  if (isProductIdChanged)
1253
1253
  setIsFirstLoading(true);
1254
1254
  handleSettings(localStorage.getItem(LOCAL_STORAGE_KEY.PRODUCT_REVIEW_SETTING) || "");
1255
- }, [isRenderApp, productId, triggerRenderMultipleComponent]);
1255
+ }, [isRenderApp, productId]);
1256
1256
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sledge-product-review__rating", onClick: handleOnClick, children: isFirstLoading && withSkeletonLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(SkeletonLoading.Item, { width: "230px", height: "28px", color: "grey-100", rounded: "md" }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
1257
1257
  /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", style: { display: "none" }, id: "sledge-product-review-rating-icon-svg-store", children: [
1258
1258
  /* @__PURE__ */ jsxRuntimeExports.jsx("symbol", { id: "sledge-product-review-icons-rating-icon-fill", viewBox: "0 0 30 29", fill: fill_color || "#23BC45", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -2665,6 +2665,7 @@ const SearchIconWidgetPopup = () => {
2665
2665
  };
2666
2666
  const SearchResultWidget = (props) => {
2667
2667
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
2668
+ console.log("SearchResultWidget");
2668
2669
  const { isRenderApp, isJsVersion } = React__default.useContext(SledgeContext);
2669
2670
  const { layoutType = "default", query, params, children, onAfterAddToCart, onAfterAddWishlist, onAfterRemoveWishlist, onAfterRenderProduct } = props;
2670
2671
  const { keyword: queryKeyword = "" } = query || {};
@@ -2830,19 +2831,10 @@ const SearchResultWidget = (props) => {
2830
2831
  }, [isRenderApp]);
2831
2832
  React__default.useEffect(() => {
2832
2833
  if (Boolean(previousState && (previousState == null ? void 0 : previousState.keyword) !== keyword) && layoutType === "default") {
2834
+ const INSTANT_SEARCH_SETTING = JSON.parse(localStorage.getItem(LOCAL_STORAGE_KEY.INSTANT_SEARCH_SETTING) || "");
2833
2835
  const delayDebounceFn = setTimeout(() => {
2834
- handleInitStates(
2835
- {
2836
- filters: allowedFilters,
2837
- tabs: allowedTabs,
2838
- suffix_index_product: suffixIndexProduct,
2839
- hidden_tags: hiddenTags,
2840
- display: displaySettings,
2841
- colors: colorSwatches,
2842
- show_out_of_stock: showOutOfStock
2843
- },
2844
- "totalDataPerIndex"
2845
- );
2836
+ if (INSTANT_SEARCH_SETTING)
2837
+ handleInitStates(INSTANT_SEARCH_SETTING, "totalDataPerIndex");
2846
2838
  }, 500);
2847
2839
  return () => clearTimeout(delayDebounceFn);
2848
2840
  }