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

Render duplication for Expandable #11

Open
davehlewis opened this issue Mar 5, 2019 · 3 comments
Open

Render duplication for Expandable #11

davehlewis opened this issue Mar 5, 2019 · 3 comments

Comments

@davehlewis
Copy link

davehlewis commented Mar 5, 2019

Title: [ISSUE] Expandable element duplicates content

Version: 0.1.0

Link to reproduction (provide Codesandbox, Codepen, etc.): https://codesandbox.io/s/kkq0mmznm7

Steps to reproduce:
Can be seen on your own demos, simply try to use the component.

What is expected?: Show Content 1, Content 2 once only

What is actually happening?: Content 1 and Content 2 are duplicated.

@dillonchanis
Copy link
Collaborator

Good catch, I'll look into it. Not happening locally, but I checked it on JSBin and Codepen to make sure it wasn't an issue with Codesandbox but it's happening there as well. Probably an issue with the rendering logic. Thanks!

@davehlewis
Copy link
Author

I narrowed it down to the fact that it's rendering the scoped slot and the children, so rendering everything twice.

@dillonchanis
Copy link
Collaborator

Looks like you're right. Removing the scoped variable from the Expandable's list of Vnodes seems to fix the issue. I'm going to play with it some more to make sure everything works as expected. Thank you again!

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