Virtual scroll - bug on the official example
See original GitHub issue[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter
Current behavior Rows are not rendered when scrolling to the bottom of the table too fast with virtualization enabled.
Expected behavior Rows should be rendered properly even when scrolled fast.
Reproduction of the problem
- Open http://swimlane.github.io/ngx-datatable/#virtual-scroll
- Grab the scrollbar with your mouse and scroll to the bottom of the table.
Please tell us about your environment: Windows 10 64bit
- Table version:
- Angular version:
-
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ] Chrome 80, Firefox 73.
-
Language: [all | TypeScript X.X | ES6/7 | ES5]
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Virtual scroll official examples for treepanel generating ...
To replicate the issue, you just have to expand one of the nodes displayed in the virtual scroll example. I am particularly interested...
Read more >iharbeck/ngx-virtual-scroller - npm
ngx-virtual-scroller. Virtual Scroll displays a virtual, "infinite" list. Supports horizontal/vertical, variable heights, & multi-column.
Read more >virtual-scrolling bug with the firsts elements - EJ 2 Forums
I create a TreeGrid with virtual scroll is enable and the first element dissapears randomly, is the same in your exemple ...
Read more >Scrolling | Angular Material
Virtual scrolling is different from strategies like infinite scroll where it renders a set amount of elements and then when you hit the...
Read more >Angular Material Virtual Scrolling - Step-By-Step Explanation
This video is part of the Angular Material In Depth Course - https://angular-university.io/course/angular-material-courseCheck out the PDF ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I fixed the issue this way. Create a rxjs Subject:
scrollEvent: Subject<void> = new Subject();
then:
this.scrollEvent.pipe( debounceTime(100), map(_ => this.tableRef.offset), distinctUntilChanged(), ).subscribe(() => this.tableRef.element.getElementsByTagName(‘datatable-body’)[0].scrollTop++ );
and for the ngx-datatable scroll output, emit scrollEvent:
[html] (scroll)=“scrollEvent.next()”
Works pretty well with Angular 10.1.1 and ngx-datatable 18.0.0
I have a PR coming that should fix the demo and give some improved details on implementation: https://github.com/swimlane/ngx-datatable/pull/1991