1.2.1 • Published 4 years ago

jedligrid v1.2.1

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

jedliSlider

npm.io

DEMO page

DEMO

What is jedliGrid?

jedliGrid is lightweight, easy to use, pure (vanilla) JavaScript library to show and manage data in tables.

Compatibility

jedliGrid is made with functionality of ES6 like async/await, i haven't tested it yet on non 'present' browsers, but with some transpiler (like Babel) it should work on older browsers as well

What's new?

v. 1.2.1

  • Added function update() and updateCol()

How to use

Instal via npm

"npm install jedligrid"

NPM

import library

Events

  • afterInit (it's important to declarate init events before initialization of slider)
  • rowClick
  • colClick

How to catch events?

  1. get your html element (for example by document.getElementById())
  2. add event listener (for example element.addEventListener('afterInit), () => {}))
  3. ??
  4. Profit

rowClick and colClick returns clicked element, you can take it like this: element.addEventListener('colClick', event => { let clickedCol = event.detail.clickedElement; });

Functions

  • init()
  • initRoot()
  • initHead()
  • initBody()
  • initDOM()
  • setIndex()
  • updateIndex()
  • addContent()
  • getContent()
  • addCol()
  • addRow()
  • deleteElement()
  • deleteRow()
  • deleteCol()
  • destroy()
  • clear()
  • clearHead()
  • clearBody()
  • getRoot()
  • getHead()
  • getBody()

More info about functionality and function's params can be found in jedligrid.js file as comments

1.2.1

4 years ago

1.1.1

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.0.1

4 years ago