0.0.31 • Published 10 years ago

react-datatable v0.0.31

Weekly downloads
113
License
MIT
Repository
github
Last release
10 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

10 years ago

0.0.30

10 years ago

0.0.29

10 years ago

0.0.28

10 years ago

0.0.27

10 years ago

0.0.26

10 years ago

0.0.24

10 years ago

0.0.23

10 years ago

0.0.22

10 years ago

0.0.21

10 years ago

0.0.20

10 years ago

0.0.19

10 years ago

0.0.18

10 years ago

0.0.17

10 years ago

0.0.16

10 years ago

0.0.15

10 years ago

0.0.14

10 years ago

0.0.13

10 years ago

0.0.12

10 years ago

0.0.11

10 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

11 years ago

0.0.7

11 years ago

0.0.6

11 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago