1.0.5 • Published 2 years ago

autocols v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Autocols

Automatically hide table columns when there is not enough space.

npm version

Installation

npm i autocols

Usage

Import Autocols:

import "autocols";

Or add it via script tag:

<script src="node_modules/autocols/autocols.js"></script>

Add "autocols" class to table elements:

<table class="autocols">...</table>

Create an instance to initialize Autocols:

const autocols = new window.Autocols();

To force keeping columns add "data-keepindexes" attribute with comma separated indexes:

<table class="autocols" data-keepindexes="2,3">...</table>

Autocols is triggered when the document view (window) is resized. Use the "run" method if you need to trigger it manually:

autocols.run();
1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago