Wondering what’s next for npm?Check out our public roadmap! »

vue-grid

0.1.1 • Public • Published

Vue Grid Component

A vuejs component to render tables. It obviously still lacks features, but everything should work correctly.

Usage

<input type="text" v-model="searchQuery">
<paginaiton id="my-table"></pagination>
<grid id="my-table" rows="{{gridData}}" columns="{{gridColumns}}" filter-key="{{searchQuery}}" per-page="10"></grid>

The id property is an identifier, that connects the table to the pagination. So you can actually place your pagination in another area of the site (e.g. some sidebar).

new Vue({
  el: 'body',
  data: function() {
    return {
      searchQuery: '',
      gridColumns: ['name', 'age'],
      gridData: [
        { name: 'Barack Obama', age: 53 },
        { name: 'Some Dude', age: 24 },
        { name: 'Another Dude', age: 34 }
        // ...
      ]
    };
  }
});

Install

npm i vue-grid

DownloadsWeekly Downloads

10

Version

0.1.1

License

MIT

Last publish

Collaborators

  • avatar