0.0.31 • Published 9 years ago

react-datatable v0.0.31

Weekly downloads
113
License
MIT
Repository
github
Last release
9 years ago

RDT - DataTable Written in React

RDT is still in early stages of development. Not even alpha quality.

Demo: http://wmira.github.io/react-datatable/

A simple datagrid/datatable written with Facebook's React view framework.

Features

  • Pagination
  • Local And Remote Data Sources
  • Grid Editor
  • Custom Formatter / Renderer
  • more to come

Development

  1. Install live-server npm install -g live-server
  2. Install dependencies $ npm install
  3. Run watcher to do auto package of javascript npm run watch
  4. live-server Browser will open and you should be able to edit index.html that contains the demo usage and src/js and browser will automatically update.
  5. npm run build, npm run build-min builds source and minified source

Install

  1. npm install --save-dev react-datatable

Example Usage

  1. Displaying an array of data
var data = ...[] //array
var config = {
    style: 'pure',
    cols: [
        { property: "name", editable: true, , header: "Name"  },
        { property: "position", header: "Position"},
        { property: "office", header: "Office"},
        { property: "age", header: "Age"},
        { property: "tax", path: computeTax, header: "Tax", formatter: numberFormatter},
        { editable: true, property: "salary", header: "Salary", formatter: numberFormatter }
    ]
};


React.render(
    React.createElement(RDT, {
        config: config,
        datasource: { data: data }

    }),
    document.getElementById('content')
);

Column Attributes

AttributeDescription
propertyunique key to refer to the column
pathoptional by default, the value is from recordproperty, if path is given then it is used. path can also be a function which can be used to create a dynamic cell
headerthe column header
formatteroptional used to format a cell
0.0.31

9 years ago

0.0.30

9 years ago

0.0.29

9 years ago

0.0.28

9 years ago

0.0.27

9 years ago

0.0.26

9 years ago

0.0.24

9 years ago

0.0.23

9 years ago

0.0.22

9 years ago

0.0.21

9 years ago

0.0.20

9 years ago

0.0.19

9 years ago

0.0.18

9 years ago

0.0.17

9 years ago

0.0.16

9 years ago

0.0.15

9 years ago

0.0.14

9 years ago

0.0.13

9 years ago

0.0.12

9 years ago

0.0.11

9 years ago

0.0.10

9 years ago

0.0.9

9 years ago

0.0.8

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago