Enabling Vertical body scroll undesirably enables infinite Virtual paging along with it.
See original GitHub issueI’m submitting a … (check one with “x”)
[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
Requesting here because nobody answered my stackoverflow question - https://stackoverflow.com/questions/44523109/how-to-disable-page-output-event-being-called-on-scroll-in-ngx-datatable
Current behavior
Enabling ScrollbarV
by default fires (page)
Pagination Output on body scroll irrespective of whether actual pagination button is clicked. This has become a bottle in my project as I want body scroll ( Otherwise my page becomes too long for large tables!) with fixed headers but not infinite Virtual paging.
Expected behavior
Infinite scrolling should be enabled by another Input
and not by ScrollbarV
. I am in the early stage of adopting ngx-datatable for my highly data-driven project. But, if I can’t work around this I’ll have to move to other tools
Reproduction of the problem This is my HTML : <ngx-datatable [rows]=“rows” [columns]=“columnMeta” class=“dark” columnMode=“force” [loadingIndicator]=“loadingIndicator” [scrollbarV]=“true” [scrollbarH]=“true” [footerHeight]=“100” [externalPaging]=“true” [count]=“page.totalElements” [offset]=“page.pageNumber” [limit]=“page.size” (page)=‘setPage($event)’ (scroll)=“scrolled($event)”> </ngx-datatable>
This is SCSS : .ngx-datagrid { .datatable-body { min-height: 700px; } }
This is my js for fetching the server side data : setPage($event) { console.log("page no ", $event.offset); this.pageChange.emit($event.offset); this.page.pageNumber = $event.offset; }
What is the motivation / use case for changing the behavior? We are using a really old back end java server that doesn’t bear too many load data requests. Hence I wan’t to disable infinite loading while retaining body scroll.
Please tell us about your environment: Ubuntu, Visual Studio code , angular cli dev server.
-
Table version: 0.8.x latest
-
Angular version: 2.0.x 4.x
-
Browser: [all]
-
Language: [ TypeScript ]
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:5 (1 by maintainers)
Top GitHub Comments
Does the new
[virtualization]="false"
parameter help in this case?I agree too - simply adding an indication of where this page event originates (bodyScroll || footerScroll) would help. At the moment the page event kicks in as soon as I click in the table, reverting back to page 1.