willba-component-library 0.1.49 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "willba-component-library",
3
- "version": "0.1.49",
3
+ "version": "0.1.50",
4
4
  "description": "A stroybook 6 with TypeScript demo",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.esm.js",
@@ -121,7 +121,7 @@ export const useFilterBar = ({
121
121
 
122
122
  handleSelectedFilter(false)
123
123
 
124
- if (onSubmit) {
124
+ if (onSubmit && selectedPath === '/rooms') {
125
125
  const updatedParamsObject: { [key: string]: string } = {}
126
126
 
127
127
  updatedParams.forEach((value, key) => {
@@ -143,7 +143,7 @@ export const useFilterBar = ({
143
143
 
144
144
  handleSelectedFilter(false)
145
145
 
146
- return onSubmit
146
+ return onSubmit && selectedPath === '/rooms'
147
147
  ? onSubmit(newParams)
148
148
  : (window.location.href = `${redirectUrl}/${selectedPath}${
149
149
  querySearchParams ? `?${querySearchParams.toString()}` : ''