table-of-data:
[ This description is mirrored from README.md at github.com/zvakanaka/table-of-data on 2019-05-22 ]
Table Custom Element
About
Lightweight and easy to use data table
Usage
Import the element in the head
<script src="./table-of-data.js">
Put the element somewhere in the body
<table-of-data></table-of-data>
Put data in the table
let data = {
headings: [ 'State', 'Place' ],
rows: [
[ 'California',
'Redwood Forest'
],
[ 'New York',
'New York Islands'
]
]
};
document.querySelector('table-of-data').data = data;
Polyfill
Only Custom Elements needs to be polyfilled (webcomponents-hi-ce.js
). To see how to use a polyfill, check out index.html, which only loads the polyfill if needed (credit to Eric Bidelman).