sr-npm 1.7.630 → 1.7.631
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
|
@@ -177,6 +177,7 @@ async function loadJobs(_$w) {
|
|
|
177
177
|
function updateOptionsUI($item, fieldId, searchQuery) {
|
|
178
178
|
let base = optionsByFieldId.get(fieldId) || [];
|
|
179
179
|
const countsMap = countsByFieldId.get(fieldId) || new Map();
|
|
180
|
+
console.log("base before filtering: ",base)
|
|
180
181
|
for (const element of countsMap)
|
|
181
182
|
{
|
|
182
183
|
if (element[1]===0)
|
|
@@ -184,6 +185,7 @@ async function loadJobs(_$w) {
|
|
|
184
185
|
base= base.filter(o => o.value !== element[0])
|
|
185
186
|
}
|
|
186
187
|
}
|
|
188
|
+
console.log("base after filtering: ",base)
|
|
187
189
|
// Build display options with counts
|
|
188
190
|
const withCounts = base.map(o => {
|
|
189
191
|
const count = countsMap.get(o.value)
|
|
@@ -192,6 +194,7 @@ async function loadJobs(_$w) {
|
|
|
192
194
|
value: o.value
|
|
193
195
|
};
|
|
194
196
|
});
|
|
197
|
+
console.log("withCounts: ",withCounts)
|
|
195
198
|
// Apply search
|
|
196
199
|
const filtered = searchQuery
|
|
197
200
|
? withCounts.filter(o => (o.label || '').toLowerCase().includes(searchQuery))
|
|
@@ -201,6 +204,8 @@ async function loadJobs(_$w) {
|
|
|
201
204
|
const prevSelected = $item(CAREERS_MULTI_BOXES_PAGE_CONSTS.FILTER_REPEATER_ITEM_CHECKBOX).value || [];
|
|
202
205
|
const visibleSet = new Set(filtered.map(o => o.value));
|
|
203
206
|
const preserved = prevSelected.filter(v => visibleSet.has(v));
|
|
207
|
+
console.log("preserved: ",preserved)
|
|
208
|
+
console.log("filtered: ",filtered)
|
|
204
209
|
|
|
205
210
|
$item(CAREERS_MULTI_BOXES_PAGE_CONSTS.FILTER_REPEATER_ITEM_CHECKBOX).options = filtered;
|
|
206
211
|
$item(CAREERS_MULTI_BOXES_PAGE_CONSTS.FILTER_REPEATER_ITEM_CHECKBOX).value = preserved;
|