metawesome-datatable

1.0.45 • Public • Published

metawesome-datatable

pipeline status coverage report

Datatable component with pagination and filters to be used with Meta Crud.

Installation

Via NPM:

$ npm install --save metawesome-datatable

Usage/Example

Just import it and use it as a directive:

<template>
  <div id="app">
    <datatable-panel :per-page="30" url="/api/fornecedores" :fields="fields" :sortField="fields[6]" :checkbox="'pe_cdsenior'" no-data-template="Nenhum registro encontrado." pagination-info-template="Mostrando {from} até {to} de {total}" ref="datatable"></datatable-panel>
  </div>
</template>

<script>
import DatatablePanel from 'metawesome-datatable'

export default {
  name: 'App',
  components: {
    DatatablePanel,
  },
  data() {
    return {
      fields: [
        { name: 'pe_cdsenior', sortField: 'pe_cdsenior', title: 'Código' },
        { name: 'pe_nome', sortField: 'pe_nome', title: 'Nome/R. Social' },
        { name: 'pe_razsoc', sortField: 'pe_razsoc', title: 'Fantasia' },
        { name: 'pe_tppessoa', sortField: 'pe_tppessoa', title: 'Tipo' },
        { name: 'pe_cpfcnpj', sortField: 'pe_cpfcnpj', title: 'CPF/CNPJ' },
        { name: 'status', sortField: 'status', title: 'Status' },
        { name: '__component:custom-ver-xml-envio', title: 'XML Envio' },
        { name: '__component:custom-ver-xml-retorno', title: 'XML Retorno' },
      ]
    };
},

}
</script>

Build Setup

# install dependencies
$ npm install
 
# serve with hot reload at localhost:8080
$ npm run dev
 
# build for production with minification
$ npm run build

Readme

Keywords

none

Package Sidebar

Install

npm i metawesome-datatable

Weekly Downloads

1

Version

1.0.45

License

MIT

Unpacked Size

3.63 MB

Total Files

13

Last publish

Collaborators

  • meta.guilherme.monte
  • meta-enterprise