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] v-lazy doesn't work at all if transition prop is falsey #11801

Closed
Alex-Mastin opened this issue Jul 6, 2020 · 0 comments · Fixed by elirehema/nbs-web#87, elirehema/authx#10 or EuanRiggans/ukpetition.info#159
Assignees
Labels
C: VLazy T: bug Functionality that does not work as intended/expected
Milestone

Comments

@Alex-Mastin
Copy link

Environment

Vuetify Version: 2.3.3
Vue Version: 2.6.11
Browsers: Google Chrome
OS: Windows

Steps to reproduce

If you just take an example for v-lazy from the Vuetify docs and change the transition prop to something falsey, such as '', you will find that lazy loading stops working altogether.

Expected Behavior

Lazy loading should still work if you provide a falsey value, and the elements inside of v-lazy shouldn't appear in the HTML until you scroll to them.

Actual Behavior

Lazy loading does not work without some truthy value in the transition prop. The threshold is completely ignored, and any elements inside of the v-lazy element are visible in the HTML before you have scrolled those elements into view.

Reproduction Link

https://codepen.io/HeadAdmiral/pen/eYJMpgG

Other comments

The change needs to occur in genContent() inside VLazy.ts. Just some different conditionality instead of returning the slot content if the transition prop is falsey.

@ghost ghost added the S: triage label Jul 6, 2020
@johnleider johnleider added C: VLazy T: bug Functionality that does not work as intended/expected labels Dec 8, 2020
@johnleider johnleider self-assigned this Dec 8, 2020
@johnleider johnleider added this to the v2.4.x milestone Dec 8, 2020
@KaelWD KaelWD assigned KaelWD and unassigned johnleider Feb 11, 2021
@KaelWD KaelWD closed this as completed in f1c2981 Feb 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment