Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

3 лет назад
1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # react-data-grid
  2. > The core of react-data-grid
  3. ## Install
  4. ```sh
  5. npm install --save react-data-grid
  6. ```
  7. ## Usage
  8. ```sh
  9. import ReactDataGrid from 'react-data-grid';
  10. const columns = [{ key: 'id', name: 'ID' }, { key: 'title', name: 'Title' }];
  11. const rows = [{ id: 1, title: 'Title 1' }, ...];
  12. const rowGetter = rowNumber => rows[rowNumber];
  13. const Grid = () => {
  14. return <ReactDataGrid
  15. columns={columns}
  16. rowGetter={rowGetter}
  17. rowsCount={rows.length}
  18. minHeight={500} />);
  19. }
  20. ```
  21. ## Exports
  22. Asside from the grid this package exports:
  23. name | source |
  24. -----------------------|-----------------------------------------|
  25. RowComparer | [RowComparer](./src/RowComparer.js) |
  26. RowsContainer | [RowsContainer](./src/RowsContainer.js) |
  27. Row | [Row](./src/Row.js) |
  28. Cell | [Cell](./src/Cell.js) |
  29. HeaderCell | [HeaderCell](./src/HeaderCell.js) |
  30. editors | [Editors](./src/editors) |
  31. formatters | [Formatters](./src/formatters) |
  32. shapes | [shapes](./src/PropTypeShapes) |
  33. _constants | [_constants](./src/AppConstants.js) |
  34. _helpers | [_helpers](./src/helpers) |