vtex-apps / store-components

Default VTEX store components
51 stars 142 forks source link

Added Prop `hideUnavailableVariations` that enables hiding unavailable variations from DOM #1110

Open mihaidanieldumitru opened 4 months ago

mihaidanieldumitru commented 4 months ago

What problem is this solving?

Some clients have products with many variations that are unavailable at a time and they want to hide these variations and not with CSS because the showMore button still remains with the total number of variations.

How to test it?

Workspace Link 1 Workspace Link 2

Screenshots or example usage:

  "sku-selector": {
    "props": {
      "visibility": "more-than-one",
      "sortVariationsByLabel": true,
      "hideUnavailableVariations": true
    }
  },

Before

image image

After

image image image

vtex-io-ci-cd[bot] commented 4 months ago

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.