2.0.0 • Published 2 years ago

tailable-pagination v2.0.0

Weekly downloads
622
License
-
Repository
github
Last release
2 years ago

Vue Test Utils - Jest

Tailable Pagination

A Vue.js pagination component for Laravel thats built for Tailwind.

Requirements

Demo & Docs

See https://tailable.github.io/pagination/

Component Installation

npm install tailable-pagination

or

yarn add tailable-pagination

Register the Plugin

import TailablePagination from 'tailable-pagination';

Vue.use(TailablePagination);

Add the following variants to your tailwind.config.js

variants: {
    opacity: ['disabled'],
    cursor: ['disabled'],
},

Basic Example

Pagination.vue

<tailable-pagination
    :data="users"
    :showNumbers="true">
</tailable-pagination>
export default {
    data() {
        return {
            users: {},
        }
    },
    created() {
        axios.get("http://laravel.test/api/users")
        .then(response => {
            this.users = response.data;
        })
    }
}

API

Pagination Props

NameTypeDefaultDescription
dataObject{}The data from paginated AJAX request
limitNumber1The pagination limit each side of the middle button.
sizeString"default"(optional) Must be default or small or large
show-disabledBooleantrue(optional) Pagination buttons next and previous, do you want them displayed if there is nothing to click?
show-numbersBooleanfalse(optional) Pagination show numbered buttons?
hide-when-emptyBooleanfalse(optional) Hides the pagination buttons when there is no need to show them
translateObject{ nextButton: 'Next' previousButton: 'Previous' }(optional) Translate button text

Pagination Events

NameDescription
page-changedA button has been clicked

Development

To work on the package locally or to add to the documentation, run the following command:

npm run serve

To run the tests:

npm run test:unit
1.0.0

2 years ago

2.0.0

2 years ago

0.1.21

4 years ago

0.1.22

4 years ago

0.1.20

4 years ago

0.1.19

4 years ago

0.1.16

4 years ago

0.1.17

4 years ago

0.1.18

4 years ago

0.1.13

4 years ago

0.1.14

4 years ago

0.1.15

4 years ago

0.1.10

4 years ago

0.1.11

4 years ago

0.1.12

4 years ago

0.1.9

4 years ago