Skip to content
This repository was archived by the owner on Dec 25, 2021. It is now read-only.
This repository was archived by the owner on Dec 25, 2021. It is now read-only.

Pagination not working #55

Description

@ValdenirAlves

Even having the pagination set and being show at the bottom of the table, the pages are not being split and is showing only one page. In my case it should have 8 pages with 10 items in each page.

Activity

  1. hb1998 commented on Jan 10, 2019

    @hb1998

    yeah , Please provide a fix

  2. brunano21 commented on Jan 14, 2019

    @brunano21
    Owner

    @ValdenirAlves Can you show your code, please?

  3. joaquinwojcik commented on Jan 25, 2019

    @joaquinwojcik

    Im having the same problem.
    @brunano21 here's my code.

    user.template.html

    <data-table id="dataTableUsers" [header]="false" [title]="'Usuarios'" [pageLimits]="limits" [limit]="'2'" [pagination]="true" [showTitle]="false" [substituteRows]="false" [items]="listPeople" [itemCount]="itemCount">
      <data-table-column [property]="'surname'" [header]="'Apellido'"></data-table-column>
      <data-table-column [property]="'name'" [header]="'Nombre'"></data-table-column>
      <data-table-column [property]="'dni'" [header]="'DNI'"></data-table-column>
      <data-table-column [header]="'Fecha Nacimiento'">
         <ng-template #dataTableCell let-item="item">
           {{item.birthDay | date: 'dd/MM/yyyy'}}
         </ng-template>
      </data-table-column>
      <data-table-column [property]="'email'" [header]="'E-mail'"></data-table-column>
      <data-table-column [header]="'Acciones'">
        <ng-template #dataTableCell let-item="item">
          <button class="btn btn-primary btn-xs m-b" (click)="edit(item)"><i class="fa fa-pencil"></i> Editar</button>
          <button class="btn btn-danger btn-xs m-b" (click)="delete(item)"><i class="fa fa-trash"></i> Eliminar</button>
         </ng-template>
      </data-table-column>
    </data-table>
    

    user.component.ts

    limits = [2,10,20,30]
    listPeople = [] //i populate this on ngInit
    

    And this isn't working, cause it never "split" the rows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions