npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

vue-custom-table

v1.9.0

Published

### Prerequisites

Readme

vue-custom-table

Getting Started

Prerequisites

The plugin is meant to be used with existing Vue 2.x projects. It uses ES6 features so as long as your build process includes a transpiler, you're good to go.

Installing

Install with npm:

npm install --save vue-custom-table

import into project:

import Vue from 'vue';
import VueCustomTable from 'vue-custom-table';

Vue.use(VueCustomTable);

Example Usage

<template>
  <div class="hello">
    <VueCustomTable :headers="headers" :data="data" />
  </div>
</template>

<script>
    export default {
        name: 'Home',
        data() {
            return {
                data: [{
                    "id": 1,
                    "name": "Cinderella",
                    "surname": "Varney",
                    "email": "[email protected]",
                    "userImage": "https://www.freeiconspng.com/uploads/user-icon-png-person-user-profile-icon-20.png",
                    "countries": ["DE", "AL", "KS", "UK"]
                  }, {
                    "id": 2,
                    "name": "Sheridan",
                    "surname": "Delacroux",
                    "email": "[email protected]",
                    "userImage": "https://www.freeiconspng.com/uploads/user-icon-png-person-user-profile-icon-20.png",
                    "countries": ["DE", "AL", "KS", "UK"]
                  }, {
                    "id": 3,
                    "name": "Umeko",
                    "surname": "Dobrowlski",
                    "email": "[email protected]",
                    "userImage": "https://www.freeiconspng.com/uploads/user-icon-png-person-user-profile-icon-20.png",
                    "countries": ["DE", "AL", "KS", "UK"]
                  }, {
                    "id": 4,
                    "name": "Lainey",
                    "surname": "Llewhellin",
                    "email": "[email protected]",
                    "userImage": "https://www.freeiconspng.com/uploads/user-icon-png-person-user-profile-icon-20.png",
                    "countries": ["DE", "AL", "KS", "UK"]
                }],
                headers: [{
                    "key": "name",
                    "label": "Name",
                }, {
                    "key": "surname",
                    "label": "Surname",
                }, {
                    "key": "email",
                    "label": "Email",
                }],
            };
        },
    }
</script>

Note: By changing the order of the elements in the headers array, will be changed also order of the columns reflectively.

Table cell options

This is declared on the headers array. There are several types of cells. To use the default one can be achieved by not including at all attribute : customCell in the header object.

Default cell

headers: [{
    "key": "name",
    "label": "Name",
}]

Button(s) cell

headers: [{
    "key": "action",
    "label": "Action",
    "customCell": "ButtonCell",
    "customData": [{
        "caption": "Edit",
        "action": (item) => this.editTableRow(item)
    }]
}]

JsonTree cell

First run the following command

npm install --save vue-json-tree-view

Include it on your main.js and register

import TreeView from 'vue-json-tree-view'
Vue.use(TreeView);

Continue using it as the following structure

import CountriesList from './countries.json';

headers: [{
    key: 'countries',
    label: 'Countries',
    "customCell": "JsonTreeCell",
    "customData": CountriesList
}]

Link(s) cell

headers: [{
    key: 'networks',
    label: 'Networks',
    "customCell": "LinkCell",
    "customData": [{
        "caption": "Facebook",
        "target": "https://www.facebook.com/"
    }, {
        "caption": "Linkedin",
        "target": "https://www.linkedin.com/"
    }]
 }]

Checkbox cell

headers: [{
    key: 'skills',
    label: 'Skills',
    "customCell": "CheckboxCell",
    "customData": {
        "options": ["HTML", "CSS", "JS", "PHP", "JAVA", "PYTHON"],
        "action": (item, chosenValue) => this.registerChosenValue(item,chosenValue)
    }
 }]

Radio cell

headers: [{
    key: 'nativeLanguage',
    label: 'Native Language',
    "customCell": "RadioCell",
    "customData": {
        "options": ["English", "Albanian", "Italian", "German", "Chinese", "Spanish"],
        "action": (item, pickedValue) => this.registerChosenValue(item,pickedValue)
    }
 }]

Image cell

For custom style, please set it in the customStyle object inside customData. Otherwise will be a max-width of 200px for every image.

headers: [{
    key: 'userImage',
    label: 'User',
    "customCell": "ImageCell",
    "customData": {
        "customStyle" : {
            width: "100px"
        },
        "imageKey": "userImage"
    }
 }]

Input cell (Textarea | Input[text])

headers: [{
    key: 'jobTitle',
    label: 'Job Title',
    "customCell": "InputCell",
    "customData": {
        "type": "text",
        "placeholder": "Job Title",
        "value": "",
        "modelReference": "jobTitle" //This refers to one of the keys on data json
    }
  }, {
    key: 'jobTitle',
    label: 'Job Title',
    "customCell": "InputCell",
    "customData": {
        "type": "textarea",
        "placeholder": "Job Title",
        "value": "",
        "modelReference": "jobTitle" //This refers to one of the keys on data json
    }
  }]

List cell (From data or static array)

let countries = ["DE", "AL", "KS"]
headers: [{
    key: 'countries',
    label: 'Countries',
    "customCell": "ListCell",
    "customData": {
        "modelReference": "countries"
    }
  }, {
    key: 'countries',
    label: 'Countries',
    "customCell": "ListCell",
    "customData": {
        "external": true,
        "externalData": countries
    }
  }]

Icon cell

First run the following command

npm install --save vue-awesome

Include it on your main.js and register

import 'vue-awesome/icons'
import Icon from 'vue-awesome/components/Icon'
Vue.component('v-icon', Icon);

Continue using it as the following structure

headers: [{
    key: 'userIcon',
    label: 'User Icon',
    "customCell": "IconCell",
    "customData": {
      "iconName": "user"
    }
}]