sr-npm 1.7.588 → 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
|
@@ -91,16 +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
|
-
|
|
104
98
|
countsByFieldId.set(fieldId, new Map(originalOptions.map(o => [o.value, counter[o.label]])));
|
|
105
99
|
|
|
106
100
|
// Initialize UI
|
|
@@ -117,6 +111,7 @@ async function loadJobs(_$w) {
|
|
|
117
111
|
}
|
|
118
112
|
applyJobFilters(_$w,JOBS_COLLECTION_FIELDS.MULTI_REF_JOBS_CUSTOM_VALUES); // re-query jobs
|
|
119
113
|
refreshFacetCounts(_$w); // recompute and update counts in all lists
|
|
114
|
+
updateSelectedValuesRepeater(_$w);
|
|
120
115
|
|
|
121
116
|
});
|
|
122
117
|
|
|
@@ -278,6 +273,7 @@ async function refreshFacetCounts(_$w) {
|
|
|
278
273
|
}
|
|
279
274
|
|
|
280
275
|
function updateSelectedValuesRepeater(_$w) {
|
|
276
|
+
console.log("updating selected values repeater")
|
|
281
277
|
const selectedItems = [];
|
|
282
278
|
for (const [fieldId, valueIds] of selectedByField.entries()) {
|
|
283
279
|
const opts = optionsByFieldId.get(fieldId) || [];
|