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

Problem with passing wrappers to slots #113

Open
nekosaur opened this issue Aug 18, 2017 · 2 comments
Open

Problem with passing wrappers to slots #113

nekosaur opened this issue Aug 18, 2017 · 2 comments
Labels

Comments

@nekosaur
Copy link
Contributor

So I found a problem with my implementation of passing wrappers to slots (#93). I've tried investigating the cause but I've come up empty so far.

When doing this, the component renders correctly (calling .html() for example), but wrapper.instance().$children is an empty array.

const slotWrapper = mount(PropsComponent, {
  propsData: {
    prop1: 'asd',
  },
});

const wrapper = mount(SlotChild, { slots: { default: [slotWrapper] } });

Doing this however, populates the $children array correctly.

const vm = new Vue({});
const wrapper = mount(SlotChild, {
  slots: {
    default: [
      { vNode: vm.$createElement(PropsComponent, { props: { prop1: 'asd' } }) }
    ]
  }
});
@eddyerburgh
Copy link
Owner

Did you get any further with this? It would be good to get a solution - but I'm not sure when I'll have time to look into it.

@nekosaur
Copy link
Contributor Author

nekosaur commented Sep 7, 2017

Unfortunately I have not had time to look into this further either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants