@sledge-app/react-instant-search 2.0.36 → 2.0.37
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.
|
@@ -4452,7 +4452,8 @@ const ProductCard = React__default.memo((props) => {
|
|
|
4452
4452
|
isFlyout,
|
|
4453
4453
|
instantSearchSettings,
|
|
4454
4454
|
optionSelectedValue,
|
|
4455
|
-
additionalCardProps
|
|
4455
|
+
additionalCardProps,
|
|
4456
|
+
keyword
|
|
4456
4457
|
} = props;
|
|
4457
4458
|
const {
|
|
4458
4459
|
show_vendor = true,
|
|
@@ -4509,7 +4510,8 @@ const ProductCard = React__default.memo((props) => {
|
|
|
4509
4510
|
const bySplitProducts = (_c = instantSearchSettings == null ? void 0 : instantSearchSettings.split_products) == null ? void 0 : _c.by;
|
|
4510
4511
|
const optionsFiltered = bySplitProducts ? (_g = (_f = (_e = (_d = searchParamsObject == null ? void 0 : searchParamsObject[`options.${bySplitProducts}`]) == null ? void 0 : _d.split) == null ? void 0 : _e.call(_d, ",")) == null ? void 0 : _f.map) == null ? void 0 : _g.call(_f, (item2) => decodeURIComponent(item2)) : [];
|
|
4511
4512
|
const hasOptionsFiltered = (optionsFiltered == null ? void 0 : optionsFiltered.length) ? !((_h = optionsFiltered == null ? void 0 : optionsFiltered.includes) == null ? void 0 : _h.call(optionsFiltered, optionSelectedValue)) : false;
|
|
4512
|
-
|
|
4513
|
+
const isOptionNotContainsKeyword = (keyword == null ? void 0 : keyword.length) ? !(optionSelectedValue == null ? void 0 : optionSelectedValue.length) ? true : !optionSelectedValue.toLowerCase().includes(keyword.toLowerCase()) : false;
|
|
4514
|
+
if (isSplitProducts && (hasOptionsFiltered || isOptionNotContainsKeyword)) {
|
|
4513
4515
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(React__default.Fragment, { children: component }, id);
|
|
4514
4516
|
}
|
|
4515
4517
|
if (CardsComponent) {
|
|
@@ -10855,7 +10857,8 @@ const ResultProduct = React__default.memo((props) => {
|
|
|
10855
10857
|
previewSettings,
|
|
10856
10858
|
instantSearchSettings,
|
|
10857
10859
|
hitsPerPage: hitsPerPageResult,
|
|
10858
|
-
currentPage
|
|
10860
|
+
currentPage,
|
|
10861
|
+
keyword
|
|
10859
10862
|
}
|
|
10860
10863
|
);
|
|
10861
10864
|
const resultEmptyComponent = /* @__PURE__ */ jsxRuntimeExports.jsx(ResultEmpty, { ...props });
|