Skip to content

Releases: revolist/vue-datagrid

Row grouping updated

03 Feb 00:05
0adc893
Compare
Choose a tag to compare
v2.9.2

Update package.json

Grouping version up

29 Jan 00:08
ca8d8f4
Compare
Choose a tag to compare
v2.9.1

Update package.json

Minimalistic updates

04 Jan 16:49
ca0c939
Compare
Choose a tag to compare
  • Minor issues fixes
  • Minor filter design update
  • Doc update

Export plugin support

31 Dec 22:31
Compare
Choose a tag to compare

Added export to Excel (CSV)

  • Now grid support export to excel. Stacked headers preserved. No row headers included.
<template>
<vue-datagrid :columns="..."  :source="..."   :export="true" ref="grid"/>
</template>

<script>
export default {
     methods: {
        async onExport() {
          this.$refs.grid.getPlugins().then(plugins => {
               plugins.forEach(p => {
                   if (p.exportFile) {
                       const exportPlugin = p;
                       exportPlugin.exportFile({  filename: 'new file' });
                   }
             })
          });
        }
     }
}
</script>

Major sorting issue fix

29 Dec 00:56
aa519fc
Compare
Choose a tag to compare

Version up, minor fixes

28 Dec 22:50
Compare
Choose a tag to compare

New grid render and filter

28 Dec 21:54
Compare
Choose a tag to compare

Major revo-grid release support:

  • filter plugin
  • sorting plugin
  • render based on indexes
  • trimmed rows

Vue component as editor

21 Dec 01:54
Compare
Choose a tag to compare

Added a way to render vue component per editor

For better performance yet recommended to stick with classic template approach, hence it's using natural DOM virtualization.


If you consider using vue editors in grid, now you can use VGridVueEditor adaptor:

<template>
  <div id="app">
    <v-grid
      :source="rows"
      :columns="columns"
      :editors="gridEditors"/>
  </div>
</template>

<script>
import VGrid, {VGridVueEditor} from "@revolist/vue-datagrid";

const NewEditor = Vue.extend({
  props: ['rowIndex', 'model', 'save', 'close'],
  render(h) {
    return h('button', {
      on: {
        click: (e: MouseEvent) => {
          e.stopPropagation();
          this.close();
          console.log('click', this.rowIndex);
        }
      }
    }, 'I am vue');
  },
});


export default {
  name: "App",
  data() {
    return {
      gridEditors: { button: VGridVueEditor(NewEditor) },
      columns: [{
          prop: "name",
          name: "First",
          editor: "button"
        },
        {
          prop: "details",
          name: "Second",
      }],
      rows: [{
        name: "1",
        details: "Item 1",
      }]
    };
  },
  components: {
    VGrid,
  },
};
</script>

For more information please consider investigating vue-editor-adapter.tsx file.

Vue component in templates

03 Dec 17:24
Compare
Choose a tag to compare

Added a way to render vue component per cell

For better performance yet recommended to stick with classical template approach, hence it's using natural DOM virtualization.


If you consider to use vue renders in grid, now you can do kind of this:

<template>
  <div id="app">
    <v-grid
      v-if="grid === 1"
      key="1"
      theme="compact"
      :source="rows"
      :columns="columns"
    ></v-grid>
  </div>
</template>

<script>
import VGrid, {VGridVueTemplate} from "@revolist/vue-datagrid";

const NewComponent = Vue.extend({
  props: ['rowIndex'],
  render(h) {
    return <span on={{
      click: (e: MouseEvent) => {
        e.stopPropagation();
        console.log('click');
      }
    }}>{this.rowIndex}</span>;
  },
});


export default {
  name: "App",
  data() {
    return {
      columns: [{
          prop: "name",
          name: "First",
          cellTemplate: VGridVueTemplate(NewComponent)
        },
        {
          prop: "details",
          name: "Second",
      }],
      rows: [{
        name: "1",
        details: "Item 1",
      }]
    };
  },
  components: {
    VGrid,
  },
};
</script>

For more information please consider investigate vue-template.tsx file.

v1.2.0

29 Nov 01:12
310c909
Compare
Choose a tag to compare
Update README.md