1

I am trying to integrate ngx-infinite scroll library https://www.npmjs.com/package/ngx-infinite-scroll

with a primeng grid

https://www.primefaces.org/primeng-4.3.0/#/datatable

Has anyone tried to integrate those together or any other datatable.

ua_boaz
  • 1,567
  • 5
  • 24
  • 53
  • Did you find solution? – Adnan Sheikh Jun 15 '20 at 04:45
  • No we ended up going different route – ua_boaz Jun 19 '20 at 18:36
  • may I know what route you followed? I am stuck with infinite scrolling using primeng table and cannot find any solution to get it working. Thanks – Adnan Sheikh Jun 23 '20 at 16:02
  • I'm not sure what your requirement is.. i added scroll event listener, while at it reaches end datatable body, i make a api call to load next set of records – ua_boaz Jun 26 '20 at 15:16
  • That exactly what I am looking for. Can you please show me how you have captured scroll event? I will be really thankful. – Adnan Sheikh Jun 29 '20 at 09:53
  • @AdnanSheikh, i used browser events using DOM API. There are many ways of doing it. This is one example which shows how it can be done https://stackoverflow.com/questions/40664766/how-to-detect-scroll-to-bottom-of-html-element – ua_boaz Jun 29 '20 at 16:59
  • I have been trying to catch element scroll using Angular HostListner, window scroll works fine but when I try to catch element scroll it doesn't seem to work. I guess we also have to put (scroll)="onElementScroll($event)" on the specific div tag in html to get it working. But as we are working with Primeng Table I couldn't understand where we should put it. I am almost there but missing something. Can you please help? I will be grateful. – Adnan Sheikh Aug 21 '20 at 12:56

0 Answers0