Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

gridjs-vue

grid-js4.2kMIT5.0.4TypeScript support: included

A Vue.js wrapper component for Grid.js

table, grid, spreadsheet, vue, vue-component

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!

changelog

Changelog

All notable changes to this project will be documented in this file. Dates are displayed in UTC.

Unreleased

  • All new documentation af3db2b
  • Update README.md 40da820
  • update devdeps 17626e7
  • Rework new helper function f2cf99b
  • Add ready event f88802d
  • To the moon and back a5d40d7
  • Update table on window resize ea93940
  • Change attribute names to match GridJS API 995c66b
  • Update attributes.json abdaa15

[5.0.1] - 2021-06-08

  • Major update!
  • Changed semantic versioning to match version of Grid.js on which it is built to work
  • Moved entirely to an ES6 module
  • Dropped npm dependencies in favor of unpkg so it can be used entirely on the frontend without bundlers
  • Removed inessential dependencies and lightened the weight of others
  • Simplified the testing procedure

[4.0.0] - 2020-07-14

  • Update documentation

0.4.0 - 2020-07-14

  • Fix global import
  • Add createRef, h, html methods

0.3.5 - 2020-06-28

  • :wrench: another vain attempt at getting release-it to work 48919aa
  • Release 0.3.5 7ca243f

0.3.4 - 2020-06-28

  • fix url #5
  • fix css module issue and update to latest grid.js api 5ab77cd
  • initial commit 178cd64
  • fix update api + scoped css a479420