This component can be used to display a table of features.

Usage no npm install needed!

<script type="module">
  import protvistaDatatable from '';



Published on NPM

This component can be used to display a table of features.

Wrapping it within <protvista-manager> will allow highlighting of features as well as hidding features which are out of the display when zooming.



        <th>Col 1</th>
        <th>Col 2</th>
        <th>Col 3</th>
        <th>Col 4</th>
      <tr data-id="row1">
      <tr data-id="row2">
      <tr data-group-for="row2">
        <td>amet, consectetur adipiscing elit</td>


--protvista-datatable__hover: the background color of a row on mouse over

--protvista-datatable__active: the background color of a row within a highlighted region

--protvista-datatable__active--clicked: the background color of a clicked row

Data attributes


The row id. Also passed in the "change" event triggered on row click


A grouped row is collapsed by default, and a trigger is added to the row with the corresponding data-id to collapse/expand it.


Generate a dropdown filter for a given column. A select menu will be populated with values defined in data-filter-value. data-filter should be set on both the column header cell and the corresponding cells and have the same value to allow mapping.


A value used to populate the data-filter select menu content. The value should reflect the content of the cell.

API Reference


displaystart: number (optional)

The start position of the selected region.

displayend: number (optional)

The end position of the selected region.

highlight: string (optional)

A comma separated list of regions to highlight.

Each region follows the format: [start]:[end], where both [start] and [end] are optional numbers.

selectedid: string (optional)

The row id to select. Row ids are attributed based on the protvistaFeatureId attribute in each data point. These are added to the data in the various adapters.

height: number (optional)

The height of the table (in rem)

noScrollToRow: boolean (false)

Don't scroll to row if it has been selected

noDeselect: boolean (false)

Don't de-select row if clicking outside of table