question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enabling Vertical body scroll undesirably enables infinite Virtual paging along with it.

See original GitHub issue

I’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:open
  • Created 6 years ago
  • Reactions:3
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
stewxcommented, Mar 1, 2018

Does the new [virtualization]="false" parameter help in this case?

0reactions
gilbertgcommented, Feb 3, 2018

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

unnecessary horizontal scroll bar coming inspite of using ...
This is a normal behavior. A scrollbar pops up if the total column width is bigger than the container. It's not a bug,...
Read more >
Now Available: Allow Vertical Scrolling When Content Overflows
Bubble is a visual programming language that lets you build web applications without code. Using Bubble's visual editor, you can build a ...
Read more >
Scrolling Scenarios - JavaScript Data Grid
Embedded rows scroll horizontally with the other rows. There are 15 rows and pagination page size is 10, so as you go from...
Read more >
Documentation: DevExtreme - JavaScript Data Grid Scrolling
Scrolling allows a user to browse data left outside the current viewport. The UI component provides several scrolling modes detailed in the mode...
Read more >
Vertical scroll fitting - DataTables
Name Position Office Salary Tiger Nixon System Architect Edinburgh $320,800 Garrett Winters Accountant Tokyo $170,750 Ashton Cox Junior Technical Author San Francisco $86,000
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found