0

I have a dynamic angular-datatable something similar to this https://l-lin.github.io/angular-datatables/#/withFixedHeader, also table got horizontal scroll bar. Currently fixed header datatable plugin not supporting scroll. Any idea how to implement this ?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
yuvaraj
  • 149
  • 1
  • 1
  • 10

1 Answers1

-1

Check the scroll event of datatable and initialize it in angular,

angular.element(document).on('init.dt', function() { document.querySelector('.dataTables_scrollBody').onscroll = function(e) {

// dtInstanceCallback // call the dtInstance again.

} }) so, whenever a scroll event happens in angular datatable then it will recreate the table which in turn works as expected.

Note: This makes datatable too compatible with scroll events in angular way :)

Prakash A
  • 1
  • 2