React SimpleSheet
![]() |
![]() |
![]() |
![]() |
![]() |
|---|---|---|---|---|
| IE 8 + IE 8+ ✔ | Chrome 31.0+ ✔ | Firefox 31.0+ ✔ | Opera 30.0+ ✔ | Safari 7.0+ ✔ |
var SimpleSheet = require('rc-simple-sheet');
var React = require('react');
var ReactDOM = require('react-dom');
ReactDOM.render(<SimpleSheet />, container);npm start and then go to
http://localhost:8000/examples
Online examples: http://pchange.github.io/rc-simple-sheet/examples/
| name | type | default | description |
|---|---|---|---|
| value | array | [] | components value, if should be as array with elem object link `{row: 0, column: 5, render: ({ record, row, column }) => {console.log('record', record, 'row', row, 'column', column); return ( value ); } }` |
| onChange | Function | callback when value changed initiative | |
| selectionCell | array | '' | components selectionCell value, if should be as array with elem object link `{row: 0, column: 5}` |
| onSelectionCellChange | Function | callback when selectionCell changed initiative | |
| className | string | '' | additional className at container |
| rows | array | [{label: 1, index: 1, }, {label: 2, index: 2, }, ], | row define, index must be unique |
| columns | array | [{label: 1, index: 1, }, {label: 2, index: 2, }, ], | column define, index must be unique |
| ySelect | boolen | true | select cell when mouse draging y coordinate |
| xSelect | boolen | true | select cell when mouse draging x coordinate |
| rowHeight | number | 30 | change row Height whth this props |
| cellWidth | number | 50 | change cell Width whth this props |
| labelCellWidth | number | 50 | change label Cell Width whth this props |
| selectedAppend | boolen | false | if true, append selectionCell cell when click or drag. if false, recount selectionCell and abandon the old selection |
| cellSelectClassName | string | '' | add className to selection Cell |
npm install
npm startnpm test
npm run chrome-testnpm run coveragerc-simple-sheet is released under the MIT license.






