JSPM

  • Created
  • Published
  • Downloads 2046
  • Score
    100M100P100Q109916F
  • License MIT

A Vue.js wrapper component for Grid.js

Package Exports

  • gridjs-vue

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gridjs-vue) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

gridjs-vue

gridjs-vue logo

A Vue wrapper component for Grid.js.

npm Grid.js API
version GitHub last commit GitHub
issues Discord

Install

npm install gridjs-vue

Also available on unpkg and Skypack!

<script>
  import Grid from 'gridjs-vue'

  export default {
    components: {
      Grid
    }
  }
</script>

Basic Usage

Pass columns (an array of column headers) and either rows, from, or server as a data source to the component. Everything else is optional. Pass in new data to update the table.

Read the full documentation for further configuration options.

Example

<template>
  <grid :columns="columns" :rows="rows" @ready="myMethod"></grid>
</template>

<script>
  import Grid from 'gridjs-vue'

  export default {
    name: 'Cars',
    components: {
      Grid
    },
    data() {
      return {
        columns: ['Make', 'Model', 'Year', 'Color'],
        rows: [
          ['Ford', 'Fusion', '2011', 'Silver'],
          ['Chevrolet', 'Cruz', '2018', 'White']
        ]
      }
    },
    methods: {
      myMethod() {
        console.log("It's ready!")
      }
    }
  }
</script>

🤝 Contributing

Originally authored by Daniel Sieradski.

Contributions, issues and feature requests are welcome!

Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!