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 🙏

© 2026 – Pkg Stats / Ryan Hefner

simple-table-vue

v0.8.0

Published

Simple table component with sticky headers for Vue.js

Readme

A Vue.js component to render filterable tables with sticky headers

This repository contains a Vue.js component that can render a filterable table with sticky headers.

This component aims to be efficient at handling big tables with loads of rows.

For the moment it is dependent on jQuery.

jQuery UI is not used by the component itself, only by the working example to make the component container resizable.

The component is currently being used in a database based SPA. Regular updates can be expected. Please report any issue you may find at https://github.com/Naujiano/simple-table/issues

Installation

npm install simple-table-vue

Usage

The only required property is rows.

Vue.js code:

<template>

    <SimpleTable 
        :rows = "rows"
        :editablekeys = "['Nombre','Descripcion','Tipo']" 
        :hiddenKeys = "['cli_id']" 
        @rowEdit = function ( rowIndex, key, value ) {}
        @rowClick = function ( row ) {}
        @checkClick = function ( checkedRowsIndexes ) { console.log ( "The number of checked rows is: " + checkedRowsIndexes.length ) }
        :actions = {
            button: `<svg style="width:20px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 52 52"><path d="M26 0C11.7 0 0 11.7 0 26s11.7 26 26 26 26-11.7 26-26S40.3 26 0zM38.5 28h-25c-1.1 0-2-0.9-2-2s0.9-2 2-2h25c1.1 0 2 0.9 2 2S39.6 28 38.5 28z"/></svg>`
            , func: function (event,_rowIndex) {
                event.stopPropagation();
                console.log ( _rowIndex )
            }
        }
    />

</template>

<script>

    import {SimpleTable} from 'simple-table-vue'

    export default {
        data () {
            return {
              rows: [
                    {nombre:"javier",apellido:"",dni:""}
                    ,{nombre:"juan",apellido:"migliorini",dni:"12345678z"}
                    ,{nombre:"javier",apellido:"de la quintana",dni:"12345678z"}
                ]
            }
        }
    }

</script>

Props

The following props can be passed to the component:

  • rows: (required) the data the component will operate on. An Array of Objects.
  • nowrap: False by default. If set to True each <td> of the table will have white-space: nowrap in its style.
  • selectable: True by default. If set to False the 'select row' functionality will be disabled.
  • searchable: False by default. If set to True a searchable field will appear below each header. The searched value will be treated as a regular expression.
  • checkable: False by default. If set to True a checkbox field will appear to the left of each record.
  • overflow: auto by default. This value is assigned to the overflow-x css parameter of the component. The overflow-y css parameter is hardcoded to scroll in the component, so the vertical scrollbar is always shown.
  • cellMaxHeight: Set the table <td> maximum height. Use a number followed by a unit indentifier, for example 12px.
  • hiddenKeys: An Array of Strings. Use this if you want to not render some keys from the rows property. You will usually want to hide an ID field that you pass for editing purposes.
  • checkedRows: An Array of Numbers. Pass the row indexes you want to check.
  • editablekeys: An Array of Strings. Use this if you want to allow the edition of some keys from the rows property.
  • actions: An Array of objects. Each Object of the Array defines a user button that will appear to the right of the each record and must have the properties: button and func. The first being the HTML code to define the button and the second a function that will be called when the button is clicked. This function receives two parameters: event and rowIndex.

Events

The component emits the following events:

  • checkClick: Fired when the checkbox of a row is clicked. Returns an Array with the indexes of the rows checked.
  • rowClick: Fired when a row is selected. Returns an Object with the entire row.
  • rowEdit: Fired when a row is edited. Returns an Object with the following keys: rowIndex, key, value, with the index of the edited row, they edited keyname and the value after the edition is done.

The component listen to the following events:

  • resize: Fired when the browser window is resized. The component recalculates the headers size and position each time this event is fired. You can fire this event from Javascript if you need to make the component react to a container resize event on your code.

Styling

The component only change the css classes of the elements on actions. You can give custom style to these classes. Use the style.css file from the working example as reference.

Interactive working example

You can see the component in action and test its properties with your own data in the following working example.