wct-datatables-net
v1.4.4
Published
Datatables.net as a webcomponent
Downloads
230
Maintainers
Readme
wct-datatables-net
Web component for datatables.net
Installation
npm install wct-datatables-net
Usage
Read API
Example of usage in a lit-element component :
import { LitElement, html } from 'lit-element'
import 'wct-datatables-net'
class ExampleApp extends LitElement {
render () {
return html`
<data-table .options=${{
'order': [[ 0, 'desc' ]],
'columns': [
{ title: 'name' },
{ title: 'position' },
{ title: 'salary' },
{ title: 'office' },
],
'data': [
['a1', 'b1', 'c1', 'd1'],
['a2', 'b2', 'c2', 'd2']
]
}}></data-table>
`
}
}
customElements.define('example-app', ExampleApp)
Also see example folder