# table-pager

> A simple pagination for any kind of table

Latest version **1.2.0** (published 2020-04-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install table-pager
pnpm add table-pager
yarn add table-pager
bun add table-pager
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2020-04-18 |
| First published | 2020-04-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 15.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | EABITSERVICES |
| Maintainers | eabitservices |

## Links

- npm: https://www.npmjs.com/package/table-pager
- npm.io page: https://npm.io/package/table-pager

## Recent versions

- 1.2.0 (latest) — 2020-04-18
- 1.0.2 — 2020-04-04
- 1.0.1 — 2020-04-04
- 1.0.0 — 2020-04-04

## README

# table-pager

A simple pagination for html table. It comes with default search which can be overwritten. It uses bootstrap css for button style.

# Installation and usage

```sh
$ npm install table-pager

In your main entry file 

import TablePager from 'table-pager/dist/index.js'
Vue.use(TablePager)

<template>
  <div>
    <table-pager v-if="users.length > 0" :tableData="users" :searchFunction="pagerQueryFunction">
        <template v-slot:pagertable="{propdata}">
            <table>
                <thead>
                    <tr>
                        <th>Name</th>
                    </tr>
                </thead>
                <tbody>
                    <tr v-for="(item, i) in propdata" :key="i">
                        <td>
                            {{item.name}}
                        </td>
                    </tr>
                </tbody>
            </table>
        </template>
    </table-pager>
  </div>
</template>

<script>
export default {
  name: 'test',
  data () {
    return {
        users: [{name:'Eric'},{name:'Joe'},{name:'Joe'},{name:'Joe'},{name:'Joe'},{name:'Joe'},{name:'Joe'},{name:'Joe'},{name:'Joe'},{name:'Joe'},{name:'Joe'},{name:'Joe'},{name:'Joe'}]
    }
  }
  methods: {
    pagerQueryFunction (data = [],searchKey='') {
        return data.filter(item => {
            return item.name.toLowerCase().includes(searchKey.toLowerCase())
        })
    }
  }
}
</script>

```

---
_Source: https://npm.io/package/table-pager · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
