mazdik / ng-mazdik

Angular UI component library
https://mazdik.github.io/ng-mazdik
MIT License
89 stars 34 forks source link

Pagination for dtHeaderTemplate child group #63

Open Anzil-Aufait opened 4 years ago

Anzil-Aufait commented 4 years ago

Is there any way to add pagination for dtHeaderTemplate child row group.

I want to add pagination here

Anzil-Aufait commented 4 years ago

@mazdik , are you planning to add this feature or not ??

mazdik commented 4 years ago

try add in template

    <app-pagination
      [totalItems]="table.pager.total"
      [perPage]="table.pager.perPage"
      [currentPage]="table.pager.current"
      [pageSizeOptions]="(table.settings.virtualScroll) ? [] : table.pager.pageSizeOptions"
      (pageChanged)="onPageChanged($event)">
    </app-pagination>
  onPageChanged(event: PageEvent): void {
    this.table.pager.current = event.currentPage;
    this.table.pager.perPage = event.perPage;
    this.table.events.onPage();
    if (this.table.settings.virtualScroll) {
      this.body.scroller.setPageOffsetY(event.currentPage);
    } else {
      if (this.table.clientSide) {
        this.table.loadLocalRows();
      }
    }
    this.table.selection.clearSelection();
  }
Anzil-Aufait commented 4 years ago

@mazdik , this pagination will apply whole table right ??

I need to add pagination for child items of separate row groups. That is, each row group requires a pagination that is applicable to the children in that row group.

I try some other way for pagination and it's not a complete one, can you look this one ??

Anzil-Aufait commented 4 years ago

@mazdik , Is there any way to achieve this feature with your package ??