🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@vmaimone/vm-grid

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vmaimone/vm-grid

ag-grid wrapper for vue

1.0.14
latest
npm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Usage

In the template:

<vue-grid 
  :row-data="rows"
  :column-defs="cols"
  :sort-model.sync="sorts"
  :filter-model.sync="filters"
  :quick-filter="quickfilter">
</vue-grid>

Parent Component:

const VueGrid = require('vm-grid');

const $vm = new Vue({
  
  el: '#app',
  
  components: {'vue-grid': VueGrid },
  
  created: function () {
    getSampleData3().then(data => this.$set('rows', data))
  },
  
  data: {
    quickfilter: '',
    
    cols: [
      {headerName: 'col1', field: 'Column 1'},
      {headerName: 'col2', field: 'Column 2'},
      {headerName: 'col3', field: 'Column 3'}
    ],
    
    rows: [],
    
    /* will set the initial state of filter and sort models */
    filters: { 
      fieldName: ['selectedValue'] 
    },
    sorts: {
      something: 'asc'
    }
  },
  
  methods: {
    /* interact with the bound models */
    sortBySomething: function() {  
      this.$set( 'sorts', { something: 'desc'} )  
    }
  }    
})

FAQs

Package last updated on 04 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts