sr-npm 1.7.197 → 1.7.199

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": "sr-npm",
3
- "version": "1.7.197",
3
+ "version": "1.7.199",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -195,7 +195,7 @@ async function applyFilters(_$w, skipUrlUpdate = false) {
195
195
  _$w(filter.elementId).value = '';
196
196
  filter.value = '';
197
197
  if (!skipUrlUpdate) {
198
- queryParams.remove(["keyWord", "department","page"]);
198
+ queryParams.remove(["keyWord", "department","page","location"]);
199
199
  }
200
200
  }
201
201
 
@@ -314,6 +314,7 @@ function fixDropdownOptions(dropdown,optionsFromCMS, _$w){
314
314
  }
315
315
 
316
316
  async function handleLocationParam(_$w,location) {
317
+ const locationValue = decodeURIComponent(location);
317
318
  let dropdownOptions = _$w('#dropdownLocation').options;
318
319
  console.log("location dropdown options:", dropdownOptions);
319
320
  const optionsFromCMS=await wixData.query("cities").find();
@@ -329,8 +330,8 @@ async function handleLocationParam(_$w,location) {
329
330
  await applyFilters(_$w, true); // Skip URL update since we're handling initial URL params
330
331
  }
331
332
  else{
332
- console.warn("department value not found in dropdown options");
333
- queryParams.remove(["department" ]);
333
+ console.warn("location value not found in dropdown options");
334
+ queryParams.remove(["location" ]);
334
335
 
335
336
  }
336
337