ngx-easy-table icon indicating copy to clipboard operation
ngx-easy-table copied to clipboard

How to add a sticky header without virtual scroll and with pagination

Open muhammed671 opened this issue 3 years ago • 0 comments

Hello,

How I can change the header to sticky header with this configuration?

this.configuration = { ...DefaultConfig };
this.configuration.searchEnabled = true;
this.configuration.horizontalScroll = true;
this.configuration.tableLayout.style = 'tiny';
this.configuration.checkboxes = true;

HTML

<ngx-table
  [configuration]="configuration"
  [data]="this.data"
  #table
  [detailsTemplate]="detailsTemplate"
  [columns]="columns"
  (event)="eventEmitted($event)"
>
<ng-template let-row let-index="index">
   ...
</ng-template>
</ngx-table>
<ng-template #detailsTemplate let-row>
  ...
</ng-template>

I tried already this here in my scss file:

:host ::ng-deep #table {
    font-family: 'Montserrat', sans-serif;
    .ngx-table__header{
      position: -webkit-sticky;
      position: sticky;
      top: 0;
      z-index: 9999;
    }
}

But it's not working.

muhammed671 avatar Feb 19 '22 02:02 muhammed671