Comments (7)
@hazzo I'm trying to implement dynamic on-demand loading, but there are still problems.here
from vue-recyclerview.
hmmmmmm but if you implement dynamic on-demand data it would be by using the fetch function? If it's like that how would you use the bottom scroll if you don't know the total elements of the list?
from vue-recyclerview.
The current pattern is that the data is linearly increased and the rendering mode is also from top to bottom layout, and I have not done a good solution to implement it
from vue-recyclerview.
Hmmmmmm. But how much it will change everything if for example:
- Get a chunk of 50 items
- Scroll to bottom of that 50 items
- Scrolling up -> if > el.scrollTop = el.scrollHeight + offset > Trigger fetch & save position
- New chunk of 50 -> unshift every element to array (so you don't modify items positions)
- Calculate height of every element and as its been added to viewport scroll to saved position plus the added height to avoid to many jumps on scroll.
- Once data it's loaded the DOM recycling behavior it's just the same as now.
- Don't listen to scrolling down for fetching more data.
I know that maybe this is a tricky, but how this affects current rendering from top to bottom? I know that dynamic fetching could be kind of nightmare because you don't "know" where are you scrolling.
But as it is now only data it's being fetch on scroll down, why not only on scroll up and let this be decided by a prop in the component? What I mean, or you fetch data on scroll down or scroll up?
from vue-recyclerview.
@hazzo you're using variable sizes too, correct? Curious, are you having any mem issues or crashes say from too many different template heights? Or do you have only a cpl perhaps? (sorry for the side question)
from vue-recyclerview.
Looking to do the same exact thing with this component. I am trying to fetch data when user scrolls up to load older chat history. @hazzo any luck with this? Or did you go down another route.
from vue-recyclerview.
@agaripian I took another approach. I'm using computed property and benefiting of how vue manages everything in virtual DOM. So I load data on scroll up or down and then scrolling back to last known position. it's no fluent as this component but for sure more memory and time efficient. Every virtual list component I look does not get into consideration the possibility for multiple methods to load more data.
from vue-recyclerview.
Related Issues (20)
- Errors beforeDestroy component HOT 14
- Enhancement: Tombstone height defines how many elements get set in DOM HOT 5
- Is it possible to pass extra props to component? HOT 6
- Suport for multiple tombstone templates
- Plugins props are always undefined
- Parent component not accessable HOT 2
- 作者啊,给个浏览器端集成的例子吧
- How to update the List after render?
- 使用瀑布流的时候,图片空白
- 提一下意见,这库不好用 HOT 1
- element-ui table 怎么使用呢?
- this.options.usePrefix - Cannot read property "usePrefix" of undefined
- 可以用在微信小程序上吗?mpvue框架?
- Simplified usage HOT 2
- Example confussing HOT 2
- Append/Prepend/Update HOT 5
- Suggestion: Start list from end HOT 3
- Scrolling to last index in list (bottom) render problem HOT 5
- Prerender and Remain default values HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-recyclerview.