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: emit @mismatch when subslot filters out invalid elements #175

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

Comments

@pretzelhammer
Copy link

Currently subslot only emits a no-match event if no valid elements are found, however it would be very nice if it also emitted a mismatch event when invalid elements are found. My use-case is I'm using subslot to validate the components a user is passing in through a slot and if they pass an invalid component I would like to log a console warning. Thanks!

@privatenumber
Copy link
Owner

If using the mixin API, all non-matching vnodes should be in this.$subslots.default.

This might not yield what you want if you have multiple subslots though.

I want to be careful with keeping this as a slot filteration library rather than a validation one, but I will think about this some more.

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