New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

column-control

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

column-control

decorate an html table with basic column controls

  • 2.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Column-Control

Input an html table. Output controls to hide / show / move columns of that table.

Controls:

With drop down open:

To play with an example, download and run: npm run-script example

Usage

A basic implementation:

var cc = require('column-control');

var targetTable = document.querySelector('.target-table');

var opts = {
  table: targetTable
  };

var controls = cc(opts);

If you do not use the "columns" option (detailed below), then column-control will use the data in the first row of the target table as titles for the controls.

Options:

table :          (required) this is a reference to the table you are
                 making controls for.

defaultColumns : an array of the column titles you want shown upon load.
                 Use this only if you are not using the "columns" option.

columns :        this is an array of objects. each object holds options for
                 that column and may contain:

  title :             (string) what is displayed as the label in the
                      drop down and button control

  default :           (boolean) show/hide on load

  additionalControl : (DOM element) use this is you'd like to drop some
                      additional html into the button control for each
                      column. Example coming soon.

Keywords

FAQs

Package last updated on 25 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc