@digital-b2c/coreui-kit 0.11.16 → 0.11.18
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/index.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +3 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3293,7 +3293,8 @@ var ResourcesGridList = ({
|
|
|
3293
3293
|
setCurrentPage(1);
|
|
3294
3294
|
const categoryText = (_b = (_a2 = categories[index]) == null ? void 0 : _a2.label) == null ? void 0 : _b.replaceAll(" ", "-");
|
|
3295
3295
|
if (typeof window !== "undefined" && categoryText) {
|
|
3296
|
-
const
|
|
3296
|
+
const base_url = window.location.pathname.endsWith("/") ? window.location.pathname.slice(0, -1) : window.location.pathname;
|
|
3297
|
+
const url = `${base_url}#${categoryText}`;
|
|
3297
3298
|
window.history.replaceState(null, "", url);
|
|
3298
3299
|
window.dispatchEvent(new HashChangeEvent("hashchange"));
|
|
3299
3300
|
}
|
|
@@ -3304,6 +3305,7 @@ var ResourcesGridList = ({
|
|
|
3304
3305
|
setCurrentPage(1);
|
|
3305
3306
|
};
|
|
3306
3307
|
const handleSortChange = (value) => {
|
|
3308
|
+
if (value === sortValue) return;
|
|
3307
3309
|
setSortValue(value);
|
|
3308
3310
|
setCurrentPage(1);
|
|
3309
3311
|
};
|