1.0.14 • Published 9 years ago

@vmaimone/vm-grid v1.0.14

Weekly downloads
1
License
ISC
Repository
-
Last release
9 years ago

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'} )  
    }
  }    
})
1.0.14

9 years ago

1.0.13

9 years ago

1.0.12

9 years ago

1.0.11

10 years ago

1.0.10

10 years ago

1.0.9

10 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago