react-data-grid-lei

2.0.13 • Public • Published

react-data-grid

This is a folk version of react-data-grid with some enhancements.

Install

npm install --save react-data-grid-lei

Enhancements:

1. Make the editable cell into editing status when focus in.
```
quickEdit = true
``` 
2. Skip the none-editable cells when press tab or arraw keys:
```
focusEditOnly = true
```

Usage

import ReactDataGrid from 'react-data-grid-lei';
 
const columns = [{ key: 'id', name: 'ID' }, { key: 'title', name: 'Title' }];
const rows = [{ id: 1, title: 'Title 1' }, ...];
const rowGetter = rowNumber => rows[rowNumber];
 
const Grid = () => {
 return <ReactDataGrid
  quickEdit={true}
  focusEditOnly={true}
   columns={columns}
   rowGetter={rowGetter}
   rowsCount={rows.length}
   minHeight={500} />);
}
 

Exports

Asside from the grid this package exports:

name source
RowComparer RowComparer
RowsContainer RowsContainer
Row Row
Cell Cell
HeaderCell HeaderCell
editors Editors
formatters Formatters
utils utils
shapes shapes
_constants _constants
_helpers _helpers

upstream/master

Package Sidebar

Install

npm i react-data-grid-lei

Weekly Downloads

4

Version

2.0.13

License

MIT

Last publish

Collaborators

  • fenglei