I'm using Angular 4 in pair with PrimeNG 4.2.1.
I need to stick table header on the screen while scrolling its content. Here is an example of how it looks like in PrimeNG JSF components, but unfortunately there is nothing like that in Angular DataTable component.
I tried to use standard html+css way like it is described here or here but I didn't make it work (I managed to have a scroll bar inside a table, however it brakes the rest of the UI). I tried this solution as well, but it doesn't work.
Q: Is there some way to make PrimeNG DataTable component header fixed while scrolling?
I guess the solution might be simple, but I'm not expert in frontend technologies.
UPDATE:
There is a possibility to set scrollable
and scrollHeight
on the DataTable component so scroll bar appears automatically. It works well, however I can't manage to set table size to feet the screen, otherwise it looks ugly.