sr-npm 1.7.629 → 1.7.630
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
|
@@ -175,19 +175,18 @@ async function loadJobs(_$w) {
|
|
|
175
175
|
};
|
|
176
176
|
|
|
177
177
|
function updateOptionsUI($item, fieldId, searchQuery) {
|
|
178
|
-
|
|
178
|
+
let base = optionsByFieldId.get(fieldId) || [];
|
|
179
179
|
const countsMap = countsByFieldId.get(fieldId) || new Map();
|
|
180
|
-
let countsMapWithoutZero=new Map()
|
|
181
180
|
for (const element of countsMap)
|
|
182
181
|
{
|
|
183
|
-
if (element[1]
|
|
182
|
+
if (element[1]===0)
|
|
184
183
|
{
|
|
185
|
-
|
|
184
|
+
base= base.filter(o => o.value !== element[0])
|
|
186
185
|
}
|
|
187
186
|
}
|
|
188
187
|
// Build display options with counts
|
|
189
188
|
const withCounts = base.map(o => {
|
|
190
|
-
const count =
|
|
189
|
+
const count = countsMap.get(o.value)
|
|
191
190
|
return {
|
|
192
191
|
label: `${o.label} (${count})`,
|
|
193
192
|
value: o.value
|