sr-npm 1.7.735 → 1.7.737

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.735",
3
+ "version": "1.7.737",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -361,6 +361,7 @@ function handlePageUrlParam() {
361
361
 
362
362
  }
363
363
  async function refreshFacetCounts(_$w,clearAll=false) {
364
+ console.log("refreshing facet counts");
364
365
  const fieldIds = Array.from(optionsByFieldId.keys());
365
366
  const currentJobsIds=currentJobs.map(job=>job._id);
366
367
  for (const fieldId of fieldIds) {
@@ -376,6 +377,8 @@ async function refreshFacetCounts(_$w,clearAll=false) {
376
377
  countsByFieldId.set(fieldId, counter);
377
378
  }
378
379
 
380
+ console.log("countsByFieldId: ", countsByFieldId);
381
+
379
382
  for(const field of allfields) {
380
383
  const query = (_$w(`#${FiltersIds[field.title]}input`).value || '').toLowerCase().trim();
381
384
  clearAll? updateOptionsUI(_$w,field.title, field._id, '',true):updateOptionsUI(_$w,field.title, field._id, query);
@@ -423,6 +426,7 @@ async function secondarySearch(_$w,query) {
423
426
  }
424
427
  handlePaginationButtons(_$w,true);
425
428
  updateTotalJobsCountText(_$w,true);
429
+ await refreshFacetCounts(_$w);
426
430
  return secondarySearchJobs;
427
431
  }
428
432
  async function bindSearchInput(_$w) {