npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@western-investment/vue-datatable

v0.1.8

Published

Vue data table component

Readme

###Description


vue-datatable is a package for creating datatable with filter and pagination options.
Package is using Font Awesome and lodash dependencies.

###Installation


npm install @western-investment/vue-datatable

###Usage


  • Import plugin and use it by calling Vue.use() global method.
import Datatable from '@western-investment/vue-datatable'

Vue.use(Datatable)

note

As a second parameter, pass object, which is used for translating specific fields of datatable.
If second parameter is not passed, default property values are shown.

Vue.use(Datatable, {
    lang: {
        searchText: __('Search'),
        filterText: __('Filter'),
        clearFiltersText: __('Clear filters'),
        nextText: __('Next'),
        prevText: __('Previous')
    }
})
  • Use plugin as component. :fetch-callback is required and must be a function which returns promise.
    <wi-table-column field="..."> is required for data to be shown.
<wi-table
    :fetch-callback="fetch"
>
    <wi-table-column field="id">Id</wi-table-column>
    <wi-table-column field="subject">Subject</wi-table-column>
</wi-table>

note

Promise return structure example:

   data: [
       {
         id: '1',
         subject: 'First'
       },
       {
         id: '2',
         subject: 'Second'
       }
     ]

###Datatable


Datatable plugin consists of these parts:

  1. Table frame
  2. Header
  3. Table columns
  4. Pagination

####Table

| Prop | Types | Default | Description | |---|---|---|---| | *fetchCallback | Function | - | must be function which returns promise. Fills datatable body with data. | | disableSearch | Boolean | False | show or hide search field | | disableHeader | Boolean | False | show or hide table header | | disablePagination | Boolean | False | show or hide pagination | | show-select | Boolean | False | show or hide select all column |

*is required

####Header

Use slot="filtersForm", to add your preferred filters for datatable. Header also shows clear filters and filter buttons once slot is added.

<wi-table :fetch-callback="fetch">
    <div slot="filtersForm">
        ...
    </div>
    ...
</wi-table>

####Table columns

| Prop | Types | Default | Description | |---|---|---|---| | *field | String | - | datatable field data | | sortable | Boolean | False | sort datatable column | | render | Function | - | adds Raw HTML option for datatable field |

*is required

####Pagination

Pagination contains show items per page filter and pagination