sr-npm 1.7.990 → 1.7.992

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.990",
3
+ "version": "1.7.992",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -109,14 +109,25 @@ async function handleParams(_$w,param,values) {
109
109
  let valuesAsArray = values.split(',')
110
110
  console.log("values: ",values);
111
111
  console.log("valuesAsArray: ",valuesAsArray);
112
+ let selectedIndices=[];
113
+
112
114
  for(const value of valuesAsArray) {
113
115
  const decodedValue = decodeURIComponent(value);
116
+ console.log("decodedValue: ",decodedValue);
114
117
  const field=getFieldByTitle(fieldTitlesInCMS[param],allfields);
118
+ console.log("field: ",field);
115
119
  const options=optionsByFieldId.get(field._id);
120
+ console.log("options: ",options);
116
121
  const option=getCorrectOption(decodedValue,options);
122
+ console.log("option: ",option);
117
123
  if(option) {
118
124
  const optionIndex=getOptionIndexFromCheckBox(_$w(`#${FiltersIds[field.title]}CheckBox`).options,option.value);
119
- _$w(`#${FiltersIds[field.title]}CheckBox`).selectedIndices.push(optionIndex);
125
+ console.log("optionIndex: ",optionIndex);
126
+ console.log("before {FiltersIds[field.title]}CheckBox).selectedIndices: ",_$w(`#${FiltersIds[field.title]}CheckBox`).selectedIndices);
127
+ selectedIndices.push(optionIndex);
128
+ _$w(`#${FiltersIds[field.title]}CheckBox`).selectedIndices=selectedIndices;
129
+ console.log("selectedIndices: ",selectedIndices);
130
+ console.log("after {FiltersIds[field.title]}CheckBox).selectedIndices: ",_$w(`#${FiltersIds[field.title]}CheckBox`).selectedIndices);
120
131
  let existing = selectedByField.get(field._id) || [];
121
132
  existing.push(option.value);
122
133
  selectedByField.set(field._id, existing);
@@ -127,6 +138,8 @@ async function handleParams(_$w,param,values) {
127
138
  console.warn(`${param} value not found in dropdown options`);
128
139
  }
129
140
  }
141
+
142
+
130
143
  return applyFiltering;
131
144
  }
132
145