banshee icon indicating copy to clipboard operation
banshee copied to clipboard

Render duplication for Expandable

Open davehlewis opened this issue 6 years ago • 3 comments

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.

davehlewis avatar Mar 05 '19 09:03 davehlewis

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!

dillonchanis avatar Mar 05 '19 13:03 dillonchanis

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

davehlewis avatar Mar 05 '19 14:03 davehlewis

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!

dillonchanis avatar Mar 05 '19 16:03 dillonchanis