lokyoung / vuejs-paginate

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

Fix first and last button #79

Closed fperroamiral closed 6 years ago

fperroamiral commented 6 years ago

Everytime you call this.clickHandler, you pass this.selected incremented by one except in the selectFirstPage() and selectLastPage() functions.

Even more, in selectFirstPage() and selectLastPage() functions, you didn't verify if the page selected is already the first or the last.

So, we fixed all these.

codecov-io commented 6 years ago

Codecov Report

Merging #79 into master will decrease coverage by 3.12%. The diff coverage is 33.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #79      +/-   ##
==========================================
- Coverage   79.59%   76.47%   -3.13%     
==========================================
  Files           1        1              
  Lines          49       51       +2     
  Branches       12       14       +2     
==========================================
  Hits           39       39              
- Misses          7        8       +1     
- Partials        3        4       +1
Impacted Files Coverage Δ
src/components/Paginate.vue 76.47% <33.33%> (-3.13%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8448f14...acdf7a8. Read the comment docs.

hermogenes commented 6 years ago

Hi! Some predictability of that pull request will be accepted. I need this fix :D

lokyoung commented 6 years ago

@fperroamiral Thanks for pointing this issue. Since your PR has some conflicts and some code style issue. I fixed it by myself. But I'm so appreciate of your help. @hermogenes Please try v1.9.3 Thanks.