willba-component-library 0.1.48 → 0.1.50

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.js CHANGED
@@ -3990,7 +3990,7 @@ var useFilterBar = function (_a) {
3990
3990
  ? format(calendarRange.from, 'yyyy-MM-dd')
3991
3991
  : '',
3992
3992
  endDate: (calendarRange === null || calendarRange === void 0 ? void 0 : calendarRange.to) ? format(calendarRange.to, 'yyyy-MM-dd') : '',
3993
- categories: categories,
3993
+ categories: categories.toString(),
3994
3994
  ageCategoryCounts: handleAgeCategoryRules({
3995
3995
  ageCategoryCounts: ageCategoryCounts,
3996
3996
  ageCategories: ageCategories,
@@ -4033,12 +4033,12 @@ var useFilterBar = function (_a) {
4033
4033
  var baseUrl = window.location.origin + window.location.pathname;
4034
4034
  var updatedUrl = "".concat(baseUrl, "?").concat(updatedParams.toString());
4035
4035
  handleSelectedFilter(false);
4036
- if (onSubmit) {
4036
+ if (onSubmit && selectedPath === '/rooms') {
4037
4037
  var updatedParamsObject_1 = {};
4038
4038
  updatedParams.forEach(function (value, key) {
4039
- updatedParamsObject_1[key] = value;
4039
+ if (value)
4040
+ updatedParamsObject_1[key] = value;
4040
4041
  });
4041
- console.log('sdasdasdsad', updatedParamsObject_1);
4042
4042
  return onSubmit(updatedParamsObject_1);
4043
4043
  }
4044
4044
  return (window.location.href = updatedUrl);
@@ -4061,7 +4061,7 @@ var useFilterBar = function (_a) {
4061
4061
  finally { if (e_3) throw e_3.error; }
4062
4062
  }
4063
4063
  handleSelectedFilter(false);
4064
- return onSubmit
4064
+ return onSubmit && selectedPath === '/rooms'
4065
4065
  ? onSubmit(newParams)
4066
4066
  : (window.location.href = "".concat(redirectUrl, "/").concat(selectedPath).concat(querySearchParams ? "?".concat(querySearchParams.toString()) : ''));
4067
4067
  }