sr-npm 1.7.1004 → 1.7.1005

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.1004",
3
+ "version": "1.7.1005",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -206,7 +206,7 @@ async function handleParams(_$w,param,values) {
206
206
  $item(CAREERS_MULTI_BOXES_PAGE_CONSTS.SELECTED_VALUES_REPEATER_ITEM_LABEL).text = itemData.label || '';
207
207
  // Deselect this value from both the selected map and the multibox
208
208
  $item(CAREERS_MULTI_BOXES_PAGE_CONSTS.DESELECT_BUTTON_ID).onClick(async () => {
209
-
209
+ console.log("deselect button clicked , itemData: ",itemData);
210
210
  const fieldId = itemData.fieldId;
211
211
  const valueId = itemData.valueId;
212
212
  dontUpdateThisCheckBox=fieldId;
@@ -214,13 +214,20 @@ async function handleParams(_$w,param,values) {
214
214
 
215
215
  const existing = selectedByField.get(fieldId) || [];
216
216
  const updated = existing.filter(v => v !== valueId);
217
+ const field=getFieldById(fieldId,allfields);
218
+ console.log("field: ",field);
219
+ const fieldTitle=field.title.toLowerCase();
217
220
  if (updated.length) {
218
221
  selectedByField.set(fieldId, updated);
222
+ console.log("url values to add: ",{ fieldTitle : updated.map(val=>encodeURIComponent(val)).join(',') });
223
+ queryParams.add({ fieldTitle : updated.map(val=>encodeURIComponent(val)).join(',') });
219
224
  } else {
220
225
  selectedByField.delete(fieldId);
226
+ console.log("url values to remove: ",fieldTitle);
227
+ queryParams.remove([fieldTitle ]);
221
228
  }
222
229
 
223
- const field=getFieldById(fieldId,allfields);
230
+
224
231
  const currentVals = _$w(`#${FiltersIds[field.title]}CheckBox`).value || [];
225
232
  const nextVals = currentVals.filter(v => v !== valueId);
226
233
  _$w(`#${FiltersIds[field.title]}CheckBox`).value = nextVals;