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: add min-limit prop to subslot #176

Open
pretzelhammer opened this issue Feb 1, 2021 · 1 comment
Open

feature request: add min-limit prop to subslot #176

pretzelhammer opened this issue Feb 1, 2021 · 1 comment

Comments

@pretzelhammer
Copy link

Currently there's a limit prop on subslot which allows us to set a maximum limit of components used in the slot however I would like to also have a min-limit prop which would allow me to set the minimum amount of requires components to be used in the slot. I would expect some event to be emitted if this minimum requirement is not reached.

Speaking of emitted events, currently subslot only supports no-match and I propose mismatch here but I think all of these could be consolidated into a single validation-error event which returns an object describing all validation errors, e.g.

{
    errors: ["noMatch", "mismatch", "overLimit", "underLimit"]
}
@privatenumber
Copy link
Owner

This might be worth adding to the non-mixin API, but if you use the mixin API, you should be able to check against $subslots[subslotName].length on the updated life-cycle hook

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

2 participants