Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including react-data-grid with all npm packages installed. Try it out:

require("react/package.json"); // react is a peer dependency. require("react-dom/package.json"); // react-dom is a peer dependency. var reactDataGrid = require("react-data-grid")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

react-data-grid v6.1.0

Excel-like grid component built with React, with editors, keyboard navigation, copy & paste, and the like

react-data-grid

The core of react-data-grid

Install

npm install --save react-data-grid

Usage

import ReactDataGrid from 'react-data-grid';

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
    columns={columns}
    rowGetter={rowGetter}
    rowsCount={rows.length}
    minHeight={500} />);
}

Exports

Asside from the grid this package exports:

namesource
RowComparerRowComparer
RowsContainerRowsContainer
RowRow
CellCell
HeaderCellHeaderCell
editorsEditors
formattersFormatters
shapesshapes
_constants_constants
_helpers_helpers

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free