Home > OS >  Disable toggling of pagination on horizontal scroll in aggrid
Disable toggling of pagination on horizontal scroll in aggrid

Time:11-15

I have to load the next pages when we reach current page limit by vertical scrolling. I have used aggrid paramter (bodyScroll)="loadNextPages()". But it is toggling pagination when i scroll horizontally as well when I use column filters. How to prevent toggling pagination on Horizontal scroll and toggle only on vertical scroll?

CodePudding user response:

You can filter the event from bodyScroll event.
Something like

(bodyScroll)="loadNextPages($event)"  

function loadNextPages(evt){
 if(evt.direction === 'horizontal') return;
}

enter image description here

Link to docs: https://ag-grid.com/javascript-data-grid/grid-events/#reference-miscellaneous

  • Related