willba-component-library 0.1.29 → 0.1.31
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/lib/index.esm.js +6 -4
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +6 -4
- package/lib/index.js.map +1 -1
- package/lib/index.umd.js +6 -4
- package/lib/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/FilterBar/FilterBar.tsx +1 -0
- package/src/components/FilterBar/components/guests/GuestCount/GuestCount.tsx +5 -1
- package/src/components/FilterBar/hooks/useFilterBar.tsx +2 -7
package/lib/index.js
CHANGED
|
@@ -8003,6 +8003,10 @@ styleInject(css_248z$6);
|
|
|
8003
8003
|
|
|
8004
8004
|
function GuestCount(_a) {
|
|
8005
8005
|
var label = _a.label, sortOrder = _a.sortOrder, id = _a.id, updateGuestsCount = _a.updateGuestsCount, count = _a.count, minVal = _a.minVal;
|
|
8006
|
+
React__default.useEffect(function () {
|
|
8007
|
+
if (minVal)
|
|
8008
|
+
updateGuestsCount("guests-".concat(id), minVal);
|
|
8009
|
+
}, []);
|
|
8006
8010
|
var handleDecrement = function () {
|
|
8007
8011
|
if (count > minVal) {
|
|
8008
8012
|
updateGuestsCount("guests-".concat(id), count - 1);
|
|
@@ -8174,12 +8178,9 @@ function useFilterBar(_a) {
|
|
|
8174
8178
|
}
|
|
8175
8179
|
finally { if (e_2) throw e_2.error; }
|
|
8176
8180
|
}
|
|
8177
|
-
console.log(currentSearchParams.toString(), updatedParams.toString());
|
|
8178
|
-
// Get the current URL without the query string
|
|
8179
8181
|
var baseUrl = window.location.origin + window.location.pathname;
|
|
8180
|
-
// Construct the updated URL with the modified query parameters
|
|
8181
8182
|
var updatedUrl = "".concat(baseUrl, "?").concat(updatedParams.toString());
|
|
8182
|
-
|
|
8183
|
+
handleSelectedFilter(false);
|
|
8183
8184
|
return (window.location.href = updatedUrl);
|
|
8184
8185
|
}
|
|
8185
8186
|
else {
|
|
@@ -8199,6 +8200,7 @@ function useFilterBar(_a) {
|
|
|
8199
8200
|
}
|
|
8200
8201
|
finally { if (e_3) throw e_3.error; }
|
|
8201
8202
|
}
|
|
8203
|
+
handleSelectedFilter(false);
|
|
8202
8204
|
return (window.location.href = "".concat(redirectUrl, "/").concat(selectedPath).concat(querySearchParams ? "?".concat(querySearchParams.toString()) : ''));
|
|
8203
8205
|
}
|
|
8204
8206
|
};
|