@gem-sdk/components 2.1.27-staging.6 → 2.1.27-staging.8

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.
@@ -237,6 +237,7 @@ const ProductList = ({ setting, builderProps, styles, className, children, advan
237
237
  endif
238
238
  assign arrayRelatedExclude = relatedExclude | split: ","
239
239
  assign idSelectedList = ''
240
+ assign handleSelectedList = ''
240
241
  for collection in collections
241
242
  assign collectionId = collection.id
242
243
  assign isInCollection = false
@@ -251,19 +252,21 @@ const ProductList = ({ setting, builderProps, styles, className, children, advan
251
252
  break
252
253
  else
253
254
  assign idSelectedList = idSelectedList | append: "," | append: product.id
255
+ assign handleSelectedList = handleSelectedList | append: "," | append: product.handle
254
256
  endif
255
257
  endfor
256
258
  endif
257
259
  endunless
258
260
  endfor
259
261
  endfor
260
- for item in allProductsPaginated
261
- assign handle = item.handle
262
- assign productF = item | sort
263
- if idSelectedList contains item.id
264
- assign products = products | concat: productF
265
- endif
266
- endfor
262
+ assign selectedProductHandle = handleSelectedList | slice: 1, handleSelectedList.size
263
+ assign selectedProductHandleArray = selectedProductHandle | split: ","
264
+ for handle in selectedProductHandleArray
265
+ assign productF = all_products[handle] | sort
266
+ if productF
267
+ assign products = products | concat: productF
268
+ endif
269
+ endfor
267
270
  assign products = products | uniq
268
271
  when 'vendor'
269
272
  assign vendorAssignProduct = assignProduct.vendor
@@ -233,6 +233,7 @@ const ProductList = ({ setting, builderProps, styles, className, children, advan
233
233
  endif
234
234
  assign arrayRelatedExclude = relatedExclude | split: ","
235
235
  assign idSelectedList = ''
236
+ assign handleSelectedList = ''
236
237
  for collection in collections
237
238
  assign collectionId = collection.id
238
239
  assign isInCollection = false
@@ -247,19 +248,21 @@ const ProductList = ({ setting, builderProps, styles, className, children, advan
247
248
  break
248
249
  else
249
250
  assign idSelectedList = idSelectedList | append: "," | append: product.id
251
+ assign handleSelectedList = handleSelectedList | append: "," | append: product.handle
250
252
  endif
251
253
  endfor
252
254
  endif
253
255
  endunless
254
256
  endfor
255
257
  endfor
256
- for item in allProductsPaginated
257
- assign handle = item.handle
258
- assign productF = item | sort
259
- if idSelectedList contains item.id
260
- assign products = products | concat: productF
261
- endif
262
- endfor
258
+ assign selectedProductHandle = handleSelectedList | slice: 1, handleSelectedList.size
259
+ assign selectedProductHandleArray = selectedProductHandle | split: ","
260
+ for handle in selectedProductHandleArray
261
+ assign productF = all_products[handle] | sort
262
+ if productF
263
+ assign products = products | concat: productF
264
+ endif
265
+ endfor
263
266
  assign products = products | uniq
264
267
  when 'vendor'
265
268
  assign vendorAssignProduct = assignProduct.vendor
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.1.27-staging.6",
3
+ "version": "2.1.27-staging.8",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -21,7 +21,7 @@
21
21
  "format": "prettier --write \"./src/**/*.{ts,tsx}\""
22
22
  },
23
23
  "devDependencies": {
24
- "@gem-sdk/core": "2.1.27-staging.3",
24
+ "@gem-sdk/core": "2.1.27-staging.7",
25
25
  "@gem-sdk/styles": "2.1.27-staging.0",
26
26
  "@types/react-transition-group": "^4.4.5"
27
27
  },