mdb-table-pagination reset pagination after updating datasou


Topic: mdb-table-pagination reset pagination after updating datasource

hansdaigle asked 3 years ago

Hi, I'm populating my data table with back-end data. I would like to set the page to 0 when I refresh the data. How can I control the current page selected in typescript? The pagination is currently breaking when you update the datasource and you are in page > 0. The items go in negative. (item # -7 to 0 of 26 )

enter image description here

<table
    class="table datatable-table"
    mdbTable
    mdbTableSort
    #table="mdbTable"
    #sort="mdbTableSort"
    [sm]="false"
    [dataSource]="dataSource"
    [fixedHeader]="true"
    [sort]="sort"
    [pagination]="pagination"
    [filterFn]="customTableFilter"
    [striped]="false">
...
<mdb-table-pagination #pagination [entries]="8" [entriesOptions]="[8,25,50,100,200,500]"
</mdb-table-pagination>
...

Arkadiusz Idzikowski staff commented 3 years ago

@hansdaigle Could you provide some more information on how to reproduce the problem step by step?

Currently, it is not possible to dynamically change the page of the pagination component, but it looks like a useful feature and we already added it to our to-do list.


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Open

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: MDB5 1.6.1
  • Device: Mac
  • Browser: Chrome
  • OS: Any
  • Provided sample code: No
  • Provided link: No