A blog about web mapping.

Using React's FixedDataTable as an Attribute Table

Mar 15, 2016 #GIS #js #opensource

I just updated iso to React 0.14.7 after not being able to work on it for a few months. Turns out, React has changed a lot in that time, including FixedDataTable, a popular React component for making better tables.

It is perfect for something like an Attribute Table in GIS, because there are an unknown number of columns/rows when displaying random data. FixedDataTable supports a fixed header row to make scrolling easier, fixed columns (good for an index column in this application), and column resizing. It also adds nice hooks for row clicking, so we can update the data model to select features on click.

Check out the code in iso that created a FixedDataTable from GeoJSON here: https://github.com/frankrowe/iso/blob/gh-pages/src/components/AttributeTable.jsx.