-
Notifications
You must be signed in to change notification settings - Fork 668
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
fix: improve scopedSlots option #808
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! One small change. Can you rename the function to createScopedSlots
, to be in line with createComponentStubs, createSlotVNodes, etc?
Thank you for reviewing. |
Thanks for making the changes. Can you also add a test case for the example in the issue: scopedSlots: {
foo: (createElement, props) => { return createElement('div', props); },
}, |
The case does not work. |
nodes = scopedSlotFn(props) || fallback If you think the feature is necessary, I will add an API as below. scopedSlots: {
default: (createElement) => (props) => { return createElement('div', props); }
} |
Ok, I agree that the API does not look good. I'll merge the branch as it is 👍 |
Thanks. |
#657 is not closed. scopedSlots: {
default: (createElement) => (props) => { return createElement('div', props); }
} |
Not currently, but it's a feature request so we should keep it open until we've decided definitively. I also haven't had enough time to fully assess the scopedSlots and slots API |
Thank you for reply. |
@38elements thank you for this |
This resolves #706.