lokyoung / vuejs-paginate

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

Disabling the component #98

Closed elciok closed 5 years ago

elciok commented 6 years ago

When I click a page number, I would like to disable all links inside the component while data for the page that was selected is being fetched. Currently, there is no way to do that.

I was thinking something like a Boolean property named "disabled" that could be set to true when you want to disable the whole component.

What do you think? I could work on a PR for that if you think this should be added to your project.

lokyoung commented 5 years ago

Hi @elciok . I'm afraid it's not a general requirement and it's not this component should concern. You can do this like the following. Just by adding css class or some thing which can make the style in loading.

<div v-bind:class="{ loading: loading }">
  <paginate
    :page-count="20">
  </paginate>
</div>