title: PrimeNG - Sticky header not working in p-table
body: <p>Hello I am using PrimeNG p-table which has both horizontal scroll and vertical scroll. I want to use sticky header for the table for which I have tried following 2 methods -</p>
  <pre><code>[scrollable]=&quot;true&quot;
  scrollHeight=&quot;350px&quot;
  </code></pre>
  <p>This one is making header sticky but column width is getting changed automatically, removes the horizontal scroll and trying to fit complete table in browser page width due to which columns data are overlapping with each other.</p>
  <p>Another method I tried is using css  -</p>
  <pre><code>:host ::ng-deep .ui-table-scrollable-header{
    position: sticky;
    position: -webkit-sticky;
    top: 0;
    z-index: 1000;
  }
  </code></pre>
  <p>But this code has having no effect on my UI.</p>
  <p>Can any body help me in fixing this? Below is my p-table code and all my columns are of variable length.</p>
  <pre><code>&lt;p-table #dt [columns]=&quot;cols&quot; [value]=&quot;data&quot; [paginator]=&quot;true&quot; dataKey=&quot;id&quot; editMode=&quot;row&quot; [rows]=&quot;25&quot;
      [rowsPerPageOptions]=&quot;[10,25,50,75,100]&quot; [autoLayout]='true' sortMode=&quot;multiple&quot;
      selectionMode=&quot;multiple&quot; [(selection)]=&quot;selected&quot;&gt;
  </code></pre>