Comments (4)
@agscheidle Hi Andrew! I think you may be interested in following issues: #49, #46. The second one is about pagination approach for uiScroll directive and here is callback-based Datasource.get implementation example. This approach could be applied also to Observable-based .get. But if we are talking about remote source of data and http requests, I would suggest you to build a cache layer (described in issue 46).
from ngx-ui-scroll.
Hi @dhilt, the outline in #46 is actually the approach we have, and it generally works. The issue seems to be that despite calling adapter.reload()
when the data in the middle cache layer (ngrx entity reducer has all the paged buffer, and a selector returns a slice of that data set), the scroll bottom is reached and cannot continue further.
The fundamental issue that prevents this from working for us (I suspect) is the true scroller height compared to the 'virtual' height. A scroller that truly had 1k records in it would calculate a scrollbar and scroll handle position that was much different than one calculated on only the buffer size (in my case 15 items). To truly scroll through an infinite and virtual scroll, one needs to know the total records that will be scrolled through, which is a value usually returned in a paged data set.
I will keep plugging away to get this to a point where at least the scroll handle jumps back up a few pixels to allow for more pages, but at present I can't seem to see even that work.
from ngx-ui-scroll.
@agscheidle Is it correct that the problem is that the uiScroll prevents forward scrolling right after Adapter.reload()
is called? Skipping infrastructure details, this behaviour is managed by Buffer.eof
property (end-of-file), which is set to true
when the size of downward fetched item list is less than Settings.bufferSize
(15 in your case). Can you check how many items are being fetched via Datasource.get()
right after reload? Maybe it would be helpful if you turn on the uiScroll internal logging via undocumented Datasource.devSettings.debug
set to true
(it logs, among other things, "get" method results).
from ngx-ui-scroll.
Since the first major release, pages-based datasource implementation had been included in the list of official demo samples (link).
from ngx-ui-scroll.
Related Issues (20)
- What is the best practice to update an item within the list without flashing? HOT 2
- Smoothscrolling HOT 6
- Mouse wheel scrolling gets stuck on loading after updating Chrome (v102) HOT 2
- Item separation HOT 3
- Scroll position jumps/changes when new items are loaded in viewport HOT 2
- Data loading is abnormal when scrolling up HOT 6
- Nested cdkVirtualFor in cdk-virtual-scroll-viewport HOT 1
- Sluggish on iOS HOT 3
- Observable dataSource change (emission) does not update uiScroll list HOT 4
- remove\update\prepend does not work properly HOT 2
- Scrolling on item click when it's not fully visible in list HOT 2
- TypeError: Cannot read properties of undefined (reading 'log') HOT 5
- Angular 16 compatibility ? HOT 1
- Issue: adaptor.reload(reloadIndex) not functioning correctly on iOS HOT 11
- Object reference after appending HOT 2
- Is it possible to implement nested uiScroll? HOT 4
- Multiple scroll components with windowViewport HOT 6
- Custom Routines
- Pause/resume methods
- Viewport loads all items when positioned at top HOT 1
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 ngx-ui-scroll.