rubanraj54 / vue-bootstrap4-table

Advanced table based on Vue 2 and Bootstrap 4 ⚡️
MIT License
220 stars 58 forks source link

Pagination : Preserve current index #16

Closed abdulkhaderp closed 5 years ago

abdulkhaderp commented 5 years ago

This is not really an issue, but a help /feature request . My customer want to preserve the current pagination index while he refresh the data . For example, if the user is at page 4, and he refresh the table data ( i assign new server response to this.rows) , he want to be at page 4 itself with updated data. Any luck ?

rubanraj54 commented 5 years ago

Hi @abdulkhaderp

Thanks for pointing out this. Right now there is no way to preserve the current pagination index.

But it is a valid feature request. I will consider this request & probably make a configurable option to let the user choose whether to preserve the current index or not if there is a data change.

I will implement this feature in the upcoming release (most probably this weekend).

Cheers, Ruby.

rubanraj54 commented 5 years ago

Hi @abdulkhaderp,

I implemented this feature in today's release. So please update the package and try it out.

To enable preserving pagination index, you should set preservePageOnDataChange: true in the config. By default, it is set to false.

Cheers, Ruby.

abdulkhaderp commented 5 years ago

Thanks @rubanraj54 . I will try it out.

rubanraj54 commented 5 years ago

Great.. if you would like to support this plugin, please star this repository.. 😀

tigertooth01 commented 4 years ago

Hi,

Any possibility to retain this if the user goes forward to a detail page from a table row, and then back to the table? As localstorage variable perhaps?