sr-npm 1.7.994 → 1.7.996

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.994",
3
+ "version": "1.7.996",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -140,13 +140,18 @@ async function handleParams(_$w,param,values) {
140
140
  let applyFiltering=false;
141
141
  let valuesAsArray = values.split(',')
142
142
  valuesAsArray=valuesAsArray.filter(value=>value.trim()!=='');
143
+ console.log("valuesAsArray: ",valuesAsArray);
144
+ console.log("param: ",param);
143
145
  let selectedIndices=[];
144
146
  const field=getFieldByTitle(fieldTitlesInCMS[param],allfields);
147
+ console.log("field: ",field);
145
148
  let existing = selectedByField.get(field._id) || [];
146
149
  for(const value of valuesAsArray) {
147
150
  const decodedValue = decodeURIComponent(value);
148
151
  const options=optionsByFieldId.get(field._id);
152
+ console.log("options: ",options);
149
153
  const option=getCorrectOption(decodedValue,options);
154
+ console.log("option: ",option);
150
155
  if(option) {
151
156
  const optionIndex=getOptionIndexFromCheckBox(_$w(`#${FiltersIds[field.title]}CheckBox`).options,option.value);
152
157
  selectedIndices.push(optionIndex);
@@ -158,6 +163,8 @@ async function handleParams(_$w,param,values) {
158
163
  console.warn(`${param} value not found in dropdown options`);
159
164
  }
160
165
  }
166
+ console.log("existing after for loop: ",existing);
167
+ console.log("selectedIndices after for loop: ",selectedIndices);
161
168
  selectedByField.set(field._id, existing);
162
169
  _$w(`#${FiltersIds[field.title]}CheckBox`).selectedIndices=selectedIndices;
163
170