MicroDroid / vue-materialize-datatable

A fancy Materialize CSS datatable VueJS component.
https://overcoder.dev/vue-materialize-datatable
MIT License
179 stars 67 forks source link

Automatically reset the current page to 1 when rows change #59

Closed msantelices closed 4 years ago

msantelices commented 4 years ago

Current situation:

When the data on the table changes, for example, by appling an external filter, the currentPage variable is not reseted to 1. If you are in a page different than the first one and the filtered data produces less rows than the necesary for that page, the table becomes blank and the datatable info at is wrong, for example, it will say "10-3 of 3"

\ Fix:

The watcher resets the currentPage to 1 each time the rows change

MicroDroid commented 4 years ago

Thanks!