React-Blotter
Renders a react based blotter - a table presenting data. The table
header and columns are defined using the columnConfig
configuration
object.
Install
Install as node dependency:
npm install blotter --save
Usage
ReactDOM;
Properties
columnConfig
: an object containing header and column information. The following properties are possible:header
: String, table column header valueclassName
: className that is added to th and td elementsmarkup(row, props)
: function, if set will be used to render an element into the td element.row
is an item ofdata
.props
is a reference, to the row component's react props.columns
: object with columns.
formatRow(row)
: function used to format row datadata
: an array of data to display
You can give a row a css class value by including the property
rowClassName
in the returned obect of formatRow(row)
or by already
having it on data[index]
.
All properties are passed to the row component and made available to the columnConfig, markup function.
Run local demo
npm start & npm run watch
npm run build
- build production css and jsnpm run watch
- compile css and jsnpm start
- start static dev server
License
MIT