sr-npm 1.7.890 → 1.7.892
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/backend/data.js +0 -1
- package/package.json +1 -1
- package/pages/careersMultiBoxesPage.js +13 -0
package/backend/data.js
CHANGED
package/package.json
CHANGED
|
@@ -297,7 +297,16 @@ async function loadJobsRepeater(_$w) {
|
|
|
297
297
|
|
|
298
298
|
function updateOptionsUI(_$w,fieldTitle, fieldId, searchQuery,clearAll=false) {
|
|
299
299
|
let base = optionsByFieldId.get(fieldId) || [];
|
|
300
|
+
console.log("base: ",base)
|
|
301
|
+
console.log("optionsByFieldId : ",optionsByFieldId)
|
|
302
|
+
console.log("countsByFieldId : ",countsByFieldId)
|
|
300
303
|
const countsMap = countsByFieldId.get(fieldId) || new Map();
|
|
304
|
+
console.log("countsMap: ",countsMap)
|
|
305
|
+
console.log("fieldTitle: ",fieldTitle)
|
|
306
|
+
console.log("fieldId: ",fieldId)
|
|
307
|
+
console.log("searchQuery: ",searchQuery)
|
|
308
|
+
console.log("clearAll: ",clearAll)
|
|
309
|
+
|
|
301
310
|
if(dontUpdateThisCheckBox===fieldId && !clearAll)
|
|
302
311
|
{
|
|
303
312
|
dontUpdateThisCheckBox=null;
|
|
@@ -311,6 +320,7 @@ async function loadJobsRepeater(_$w) {
|
|
|
311
320
|
filteredbase.push(element)
|
|
312
321
|
}
|
|
313
322
|
}
|
|
323
|
+
console.log("filteredbase: ",filteredbase)
|
|
314
324
|
// Build display options with counts
|
|
315
325
|
const withCounts = filteredbase.map(o => {
|
|
316
326
|
const count = countsMap.get(o.value)
|
|
@@ -320,6 +330,7 @@ async function loadJobsRepeater(_$w) {
|
|
|
320
330
|
};
|
|
321
331
|
});
|
|
322
332
|
// Apply search
|
|
333
|
+
console.log("withCounts: ",withCounts)
|
|
323
334
|
const filtered = searchQuery
|
|
324
335
|
? withCounts.filter(o => (o.label || '').toLowerCase().includes(searchQuery))
|
|
325
336
|
: withCounts;
|
|
@@ -328,7 +339,9 @@ async function loadJobsRepeater(_$w) {
|
|
|
328
339
|
let prevSelected=[]
|
|
329
340
|
clearAll? prevSelected=[]:prevSelected= _$w(`#${FiltersIds[fieldTitle]}CheckBox`).value;
|
|
330
341
|
const visibleSet = new Set(filtered.map(o => o.value));
|
|
342
|
+
console.log("visibleSet: ",visibleSet)
|
|
331
343
|
const preserved = prevSelected.filter(v => visibleSet.has(v));
|
|
344
|
+
console.log("preserved: ",preserved)
|
|
332
345
|
_$w(`#${FiltersIds[fieldTitle]}CheckBox`).options = filtered;
|
|
333
346
|
_$w(`#${FiltersIds[fieldTitle]}CheckBox`).value = preserved;
|
|
334
347
|
}
|