lokyoung / vuejs-paginate

A Vue.js(v2.x+) component for creating pagination.
MIT License
779 stars 171 forks source link

Two same paginates don't handle force-page changes properly. #74

Closed landofcash closed 6 years ago

landofcash commented 6 years ago

There are 2 same paginates which use same top level :force-page="listPage". Expected behavior: When listPage property changes both components should point on the selected page

Real behavior: pager doesn't update the selected page (until it is "activated" any page is cliecked on the component)

To reproduce try this fiddle: https://jsfiddle.net/9bocfrpw/3/

  1. click the number on pager1 and notice that on pager2 page is still 1 (you can click any number of pages on the pager1, pager2 page will remain 1)
  2. now click any page on page2. after that pagers are "in sync" and will work as expeted

thanks Mikhail

lokyoung commented 6 years ago

Hi @landofcash . If you want to keep two paginations in sync you can check this issue https://github.com/lokyoung/vuejs-paginate/issues/16 . force-page will be triggered in the beforeUpdate hook. It will be work after your first operation on the pagination component. Any questions let me know. Thanks.