InfiniteScroll offset property
I can not figure out how the infiniteScroll offset property works.
Could someone help me with this?
Thank you very much.
Remo last edited by
What’s your problem with it?
The offset just defines when the component should start loading more content.
There’s a nice and simple example https://github.com/quasarframework/quasar-play/blob/master/src/components/showcase/web-components/infinite-scroll.vue
@Remo But in this example, it does not have the use of “offset”. I was interested in doing a test and set “loadMore” to run when it was near the end of my already loaded list.
@xereda By default, Infinite Scroll triggers “loadMore” when less than one screen height is left to scroll till the end of your list. If you want to change that to some other offset, use
offsetproperty. Here’s the description from the documentation:
Offset (pixels) to bottom of Infinite Scroll container from which the component should start loading more content in advance. Default it’s one container height.
So just specify a Number which represents how many pixels off the bottom of list should the Infinite Scroll trigger “loadMore”
:offset="500"– notice we’re using Vue dynamic binding to cast property to Number.
xereda last edited by rstoenescu
I did not see anything about the “:offset” property in the documentation.
xereda last edited by xereda
Excuse me, but what is this “scroll” property? Is this an example only?
It’s a Vue property that you can use for the Infinite Scroll component. Full example:
<quasar-infinite-scroll :handler="loadMore" :offset="700" > ... </quasar-infinite-scroll>
But there is no reference to the “scroll” property in the documentation, just for the “offset”.
Ah, dammit. I’ve been meaning
offsetall the time. It’s just my exhaustion having a negative effect. Sorry. Replace
offsetin all my previous comments.
EDIT: Replaced with correct
offsetVue property in all my previous comments.
No problem. I understand perfectly!
I’ll do some simulations.