sr-npm 1.7.587 → 1.7.589

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.587",
3
+ "version": "1.7.589",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -91,15 +91,10 @@ async function loadJobs(_$w) {
91
91
  optionsByFieldId.set(fieldId, originalOptions);
92
92
  const counter={}
93
93
  const allvalues=await getAllRecords(COLLECTIONS.CUSTOM_VALUES);
94
- console.log("allvalues: ",allvalues)
95
94
  for (const val of allvalues) {
96
95
  counter[val.title]=val.totalJobs
97
96
  }
98
97
 
99
- // for (const val of fieldValues) {
100
- // const result=await wixData.queryReferenced(COLLECTIONS.CUSTOM_VALUES, val, CUSTOM_VALUES_COLLECTION_FIELDS.MULTI_REF_JOBS_CUSTOM_VALUES)
101
- // counter[val.title]=result.totalCount
102
- // }
103
98
  countsByFieldId.set(fieldId, new Map(originalOptions.map(o => [o.value, counter[o.label]])));
104
99
 
105
100
  // Initialize UI
@@ -116,6 +111,7 @@ async function loadJobs(_$w) {
116
111
  }
117
112
  applyJobFilters(_$w,JOBS_COLLECTION_FIELDS.MULTI_REF_JOBS_CUSTOM_VALUES); // re-query jobs
118
113
  refreshFacetCounts(_$w); // recompute and update counts in all lists
114
+ updateSelectedValuesRepeater(_$w);
119
115
 
120
116
  });
121
117
 
@@ -277,6 +273,7 @@ async function refreshFacetCounts(_$w) {
277
273
  }
278
274
 
279
275
  function updateSelectedValuesRepeater(_$w) {
276
+ console.log("updating selected values repeater")
280
277
  const selectedItems = [];
281
278
  for (const [fieldId, valueIds] of selectedByField.entries()) {
282
279
  const opts = optionsByFieldId.get(fieldId) || [];