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

[Bug Report] VSkeletonLoader rendering default slot unconditionally #10201

Closed
lassesteffen opened this issue Jan 13, 2020 · 4 comments · Fixed by skyYaga/skdvin-webapp#18
Closed
Assignees
Labels
C: VSkeletonLoader T: bug Functionality that does not work as intended/expected
Milestone

Comments

@lassesteffen
Copy link

Environment

Vuetify Version: 2.2.3
Vue Version: 2.6.11
Browsers: Chrome 79.0.3945.117
OS: Mac OS 10.15.2

Steps to reproduce

  1. Create a skeleton loader
  2. Reference an attribute of an undefined object
  3. See that there is a console error about it

Expected Behavior

V-skeleton-loader works similar to a v-if component and does therefore only render the content in the default slot once the loading flag is false.

Actual Behavior

The undefined object is accessed even when the skeleton loader is still loading. The slot is not rendered conditionally

Reproduction Link

https://codepen.io/ellazlo/pen/GRgGovK

Other comments

Is there any workaround? Is this the intended behaviour? If yes than it's kinda unpractical for data fetching, or am I misunderstanding something here?

@johnleider
Copy link
Member

This would happen with any custom component: https://codepen.io/johnjleider/pen/oNgyxWX?editors=1011

If you have any additional questions, please reach out to us in our Discord community.

@johnleider johnleider added invalid The issue is missing information or is not a valid bug/feature request and removed S: triage labels Jan 13, 2020
@KaelWD
Copy link
Member

KaelWD commented Jan 13, 2020

@KaelWD KaelWD reopened this Jan 13, 2020
@KaelWD KaelWD added T: bug Functionality that does not work as intended/expected and removed invalid The issue is missing information or is not a valid bug/feature request labels Jan 13, 2020
@KaelWD KaelWD self-assigned this Jan 13, 2020
@KaelWD KaelWD added this to the v2.2.x milestone Jan 13, 2020
@KaelWD KaelWD closed this as completed in e0f3f08 Jan 13, 2020
@KaelWD
Copy link
Member

KaelWD commented Jan 13, 2020

Vue renders slots when proxying them to this.$slots, so it's still broken unless you use a scoped slot: https://codepen.io/kaelwd/pen/qBEKNYP

@bblanchon
Copy link

This v-slot trick should definitely go into the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VSkeletonLoader T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants