@integec/grid-tools

Integ Grid Tools

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
121May 10, 2021Nov 21, 2017Minified + gzip package size for @integec/grid-tools in KB

Readme

Grid Tools

This library contians a setup of tools to help React developers to easily create grids for tabula data.

Basic Usage

Props

GridRenders

FLex Renderer

Virtualized Renderer

Notes

  • About data-row-index, data-column-index
  • Comparator -- not finished yet.. currenlty cannot handle mapped values unitId/unitName
  • DataGetter
  • Ref - Ref can be assigned to grid to access various methods like setSelectedRect to set selection in grid. Refer story Custom Selection Range to see the actual usage.
  • Copy Helper

DataGetter

currenlty data getter signature is ({rowData, header }). Due to the fact that the data can be filtered and or sorted there is no way to identify the data using rowIndex. This results the lib to be less flexible as ({data,rowIndex,columnIndex}). Data needs to be converted into simple array of objects format when using the libraray. Ways will be considered later to refactor so that a core version of Grid can be used for more flexible data shapes.

Things to consider (transposing the data)

Header Shape

{
  ident: 'COLNAME',
  type: 'str',
  editable: true,
  isKey: false,
  alignment: 'center',
  width: 100,
  sortable: true,
  //numFormat:
  //dateFormat:
  //
}

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.