Skip to content

Commit 6307912

Browse files
authored
Merge pull request #34 from geminilabs/master
add option to show disabled buttons
2 parents fd714fd + 15ec629 commit 6307912

11 files changed

+14966
-55
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,14 @@ Prev/Next buttons can be customized using the `prev-nav` and `next-nav` slots:
7474
</pagination>
7575
```
7676

77+
### Show disabled buttons
78+
79+
Disabled buttons (when there is no next or previous page to navigate to) can be shown instead of hidden:
80+
81+
```html
82+
<pagination :data="laravelData" :show-disabled="true"></pagination>
83+
```
84+
7785
## API
7886

7987
### Props
@@ -82,6 +90,7 @@ Prev/Next buttons can be customized using the `prev-nav` and `next-nav` slots:
8290
| --- | --- | --- |
8391
| `data` | Object | An object containing the structure of a [Laravel paginator](https://laravel.com/docs/5.7/pagination) response or a [Laravel API Resource](https://laravel.com/docs/5.7/eloquent-resources) response. |
8492
| `limit` | Number | (optional) Limit of pages to be rendered. `0` shows all pages (default). `-1` will hide numeric pages and leave only arrow navigation. Any positive integer (e.g. `2`) will define how many pages should be shown on either side of the current page when only a range of pages are shown (see below for example output). |
93+
| `show-disabled` | Boolean | (optional) Show disabled prev/next buttons instead of hiding them. `false` hides disabled buttons (default). `true` shows disables buttons. |
8594

8695
**Example `limit`**
8796

dist/laravel-vue-pagination.common.js

Lines changed: 26 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/laravel-vue-pagination.common.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/laravel-vue-pagination.umd.js

Lines changed: 26 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/laravel-vue-pagination.umd.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)