Version 0.13.0

TreeListView documentation

A commercial tree grid Web Component. One custom element, no framework required, and wrappers for React, Angular and Vue when you want them.

A grid in ten lines

<script src="./bm-treelistview.min.js"></script>

<div style="height: 520px">
  <bm-treelistview id="grid" selection-mode="checkbox" show-filter="true"></bm-treelistview>
</div>

<script>
  const grid = document.getElementById('grid');

  await customElements.whenDefined('bm-treelistview');
  await grid.ready();

  await grid.setData(
    [
      { id: 'name',   title: 'Name',   tree: true },
      { id: 'owner',  title: 'Owner' },
      { id: 'budget', title: 'Budget', kind: 'currency', aggregate: 'sum' },
    ],
    [
      {
        id: 'p1',
        cells: { name: 'Platform', owner: 'Priya', budget: 1000 },
        expanded: true,
        children: [
          { id: 'p1-a', cells: { name: 'API',  owner: 'Ade', budget: 250 } },
          { id: 'p1-b', cells: { name: 'Auth', owner: 'Bo',  budget: 750 } },
        ],
      },
    ],
  );

  grid.addEventListener('tlvSelectionChange', event => console.log(event.detail));
</script>

Where to go

The two rules that cover most problems

1. Give it a height. The grid fills its container. A container with no height is a grid with no height, and that is the single most common "it did not render" report.

2. Complex values go through properties, not attributes. An attribute is a string; columns="[object Object]" is what an array becomes if you try. Booleans, numbers and strings are fine either way.

Licensing

TreeListView is commercial software from Binarymission (UK). The demo runtime is limited to 500 loaded nodes and is not licensed for production use; the commercial runtime has no such limit. Talk to us about a licence.