Skip to content

3. Configuration

el-jacko edited this page Jul 4, 2017 · 6 revisions

columns

Type: Array with Objects
Required: yes
Object: 
- name | required | String -> The column name from the database.
- title | String | default: true -> The column title which will be shown in the table head.
- editable | boolean | default: true -> Define if the column is editable or not.
- show | boolean | default: true -> Define if the column is shown or hidden.
- validator | Object -> Define a validator for a column.
-- rules | required | Array with Strings -> Define the validation rule(s).
-- messages | required | Array with Strings -> Define the message(s).

Exemple

columns: [
          {
            title: 'Id',
            name: 'id',
            editable: false,
            show: false,
            validator: {
              rules: [
                'alpha',
              ],
              messages: [
                'Must be alpha',
              ],
            },
          },
        ],

options

Type: Object,
Required: yes (Cause of the request urls. Not required when using with JSON Data from a file.)
Object/Parameters
- showSearchFilter | boolean | default: true -> Define if the Search Field is shown.
- requests | Object
-- getUrl | String -> Define the get data Url.
-- postUrl | String -> Define the post (create) data Url.
-- patchUrl | String -> Define the get (update) data Url.
-- deleteUrl | String -> Define the delete data Url.
- pagination | Object
-- show | boolean -> Define if the pagination should be shown or hidden.
-- itemsPerPage | Int | Default: 25 -> Define the shown items per page.
-- itemsPerPageValues | Array
--- text | Int | Default: 25, 50, 100 -> Define the text which is shown in the dropdown.
--- value | Int | Default: 25, 50, 100 -> Define the values of the dropdown.

Exemple

options: {
          showSearchFilter: true,
          requests: {
            getUrl: 'http://api.dev/api/users',
            postUrl: 'http://api.dev/api/users/save',
            patchUrl: 'http://api.dev/api/users/patch',
            deleteUrl: 'http://api.dev/api/users/delete',
          },
          pagination: {
            itemsPerPage: 100,
            itemsPerPageValues: [
              { text: 10, value: 15 },
              { text: 50, value: 50 },
              { text: 100, value: 100 },
            ],
          },
        },

styling

Description: Define the style which should be used.
Type: String
Required: no
Default: custom dark
Parameters: customdark | vuetify

Exemple

styling: 'vuetify',

searchQuery

coming soon

Clone this wiki locally