sr-npm 1.7.327 → 1.7.329

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.327",
3
+ "version": "1.7.329",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -180,6 +180,11 @@ function init(_$w) {
180
180
 
181
181
  onChange((location)=>{
182
182
  console.log("URL changed onChange ", location);
183
+ console.log("query.location: ", query.location);
184
+ console.log("query.keyWord: ", query.keyWord);
185
+ console.log("query.department: ", query.department);
186
+ console.log("query.page: ", query.page);
187
+ console.log("query",query);
183
188
  handleUrlParams(_$w);
184
189
  });
185
190
 
@@ -211,6 +216,9 @@ async function applyFilters(_$w, skipUrlUpdate = false) {
211
216
  filter.value = '';
212
217
  if (!skipUrlUpdate) {
213
218
  queryParams.remove(["keyWord", "department","page","location"]);
219
+ queryKeyWordVar=undefined;
220
+ queryDepartmentVar=undefined;
221
+ queryLocationVar=undefined;
214
222
  }
215
223
  }
216
224
 
@@ -219,12 +227,15 @@ async function applyFilters(_$w, skipUrlUpdate = false) {
219
227
  if (!skipUrlUpdate) {
220
228
  if(filter.field === 'title'){
221
229
  queryParams.add({ keyWord: filter.value });
230
+ queryKeyWordVar=filter.value;
222
231
  }
223
232
  if(filter.field === 'department'){
224
233
  queryParams.add({ department: encodeURIComponent(filter.value) });
234
+ queryDepartmentVar=filter.value;
225
235
  }
226
236
  if(filter.field === 'cityText'){
227
237
  queryParams.add({ location: encodeURIComponent(filter.value) });
238
+ queryLocationVar=filter.value;
228
239
  }
229
240
  }
230
241
  if(filter.field === 'remote') {
@@ -238,12 +249,15 @@ async function applyFilters(_$w, skipUrlUpdate = false) {
238
249
  if (!skipUrlUpdate) {
239
250
  if(filter.field === 'title'){
240
251
  queryParams.remove(["keyWord" ]);
252
+ queryKeyWordVar=undefined;
241
253
  }
242
254
  if(filter.field === 'department'){
243
255
  queryParams.remove(["department" ]);
256
+ queryDepartmentVar=undefined;
244
257
  }
245
258
  if(filter.field === 'cityText'){
246
259
  queryParams.remove(["location" ]);
260
+ queryLocationVar=undefined;
247
261
  }
248
262
  }
249
263
  }