sr-npm 1.7.622 → 1.7.624

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.622",
3
+ "version": "1.7.624",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -29,6 +29,7 @@ async function careersMultiBoxesPageOnReady(_$w) {
29
29
 
30
30
  // Deselect this value from both the selected map and the multibox
31
31
  $item(CAREERS_MULTI_BOXES_PAGE_CONSTS.DESELECT_BUTTON_ID).onClick(async () => {
32
+ console.log("deselecting value: ",itemData)
32
33
  const fieldId = itemData.fieldId;
33
34
  const valueId = itemData.valueId;
34
35
  if (!fieldId || !valueId) return;
@@ -101,8 +102,8 @@ async function loadJobs(_$w) {
101
102
  // Build CheckboxGroup options for this field
102
103
  const fieldValues = valuesByFieldId.get(fieldId) || [];
103
104
  const originalOptions = fieldValues.map(v => ({
104
- valueLabel: v.title ,
105
- valueId: v._id
105
+ label: v.title ,
106
+ value: v._id
106
107
  }));
107
108
  optionsByFieldId.set(fieldId, originalOptions);
108
109
  console.log("optionsByFieldId: ",optionsByFieldId)
@@ -259,12 +260,13 @@ async function refreshFacetCounts(_$w) {
259
260
  const opts = optionsByFieldId.get(fieldId) || [];
260
261
  //const byId = new Map(opts.map(o => [o.value, o.label]));
261
262
  for (const id of valueIds) {
262
- const found = opts.find((option) => option.valueId === id);
263
- const label = found.valueLabel;
263
+ const found = opts.find((option) => option.value === id);
264
+ const label = found.label;
264
265
  //selectedItems.push({ _id: `${fieldId}:${id}`, label, fieldId, valueId: id });
265
266
  selectedItems.push({ label, fieldId, _id: id }); //_id is the valueId
266
267
  }
267
268
  }
269
+ console.log("selectedItems inside updateSelectedValuesRepeater: ",selectedItems)
268
270
  _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.SELECTED_VALUES_REPEATER).data = selectedItems;
269
271
  }
270
272