Back to Data tables-guidelines

JavaScriptThe latest version of this package is: 0.17.4, Opens in new window

Data tables javascript

This component is compatible with ESM (ES6 module) and IIFE. See documentation examples below.

To be able to install this component, please refer to the Project Setup documentation.

$ npm i @ids-js/data-tables@0.17.4

Table of Contents

Features

See the CSS Documentation for this component for required markup for each feature.

  • Sortable tables
  • Initialises bulk actions
  • Initialises expandable tables
  • Initialises filter search
  • Initialises table cell currency formatter
  • Initialises table filters
  • Initialises row actions

Usage

Install

  $ npm i @ids-js/data-tables

Required markup

See the CSS Documentation for required markup for the JavaScript library.

Init

import idsDataDables from '@ids-js/data-tables';

const tables = document.querySelectorAll('.if.data-tables');

Array.prototype.slice.call(tables).forEach(idsDataDables);

Api

idsAccordionMenu(el)

Initializes the Accordion Menu Component with the given arguments.

Param Type Description
el HTMLElement The Accordion Menu DOM Element

el : HTMLElement

The Accordion Menu DOM Element:

<nav class="if data-tables" role="menu">
  <ul class="if">
    <li class="if">
      <a role="menuitem" class="if" href="/develop"></a>
    </li><li class="if is-parent">
      <a role="menuitem" href="/asd" class="if"></a>
      <div class="if data-tables">
        <ul class="if">
          <li class="if">
            <a role="menuitem" href="/asdasd" class="if"></a>
          </li></ul>
      </div>
    </li>
  </ul>
</nav>
Contact us, Opens in new window