Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] hideIfEmpty #117

Open
khrizzcristian opened this issue Nov 2, 2020 · 0 comments
Open

[Feature Request] hideIfEmpty #117

khrizzcristian opened this issue Nov 2, 2020 · 0 comments

Comments

@khrizzcristian
Copy link

Hello,

It would be useful if we could have a prop like "hideIfEmpty" that hides the item if it does not contain products in that category. Do not load all categories even if they do not have products.

Describe the solution you'd like

"menu-item#someItem": {
        "props": {
            "type": "category",
            "categoryId": 1,
            "hideIfEmpty": true,
            ...
        },
        "blocks": [
            "[email protected]:submenu#submenu-someSubmenu"
        ]
    },

Check for products based on categoryId and if there are no products just return null

@khrizzcristian khrizzcristian changed the title hideIfEmpty [Feature Request] hideIfEmpty Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant