Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Awesome React Components | 37,045 | 24 days ago | 2 | cc0-1.0 | ||||||
Curated List of React Components & Libraries. | ||||||||||
Sheetjs | 33,614 | 4,379 | 3,816 | 2 months ago | 170 | March 24, 2022 | 129 | apache-2.0 | JavaScript | |
📗 SheetJS Spreadsheet Data Toolkit -- New home https://git.sheetjs.com/SheetJS/sheetjs | ||||||||||
Table | 22,522 | 1,770 | 1,417 | 7 days ago | 217 | May 16, 2022 | 169 | mit | TypeScript | |
🤖 Headless UI for building powerful tables & datagrids for TS/JS - React-Table, Vue-Table, Solid-Table, Svelte-Table | ||||||||||
Blueprint | 20,081 | 1,039 | 408 | 2 days ago | 271 | July 28, 2023 | 677 | apache-2.0 | TypeScript | |
A React-based UI toolkit for the web | ||||||||||
Ag Grid | 10,854 | 323 | 505 | 19 hours ago | 76 | July 28, 2023 | 69 | other | TypeScript | |
The best JavaScript Data Table for building Enterprise Applications. Supports React / Angular / Vue / Plain JavaScript. | ||||||||||
X Render | 6,371 | 1 | 49 | 10 days ago | 485 | July 13, 2023 | 18 | TypeScript | ||
🚴♀️ 阿里 - 很易用的中后台「表单 / 表格 / 图表」解决方案 | ||||||||||
Tabulator | 5,690 | 31 | 71 | 11 days ago | 85 | July 23, 2023 | 131 | mit | JavaScript | |
Interactive Tables and Data Grids for JavaScript | ||||||||||
React Datasheet | 5,192 | 30 | 24 | 7 months ago | 49 | May 27, 2022 | 127 | mit | JavaScript | |
Excel-like data grid (table) component for React | ||||||||||
Reactdatagrid | 3,472 | 20 | 2 months ago | 180 | July 31, 2023 | 73 | other | JavaScript | ||
Empower Your Data with the best React Data Grid there is | ||||||||||
Material Table | 3,440 | 264 | 177 | 3 months ago | 193 | June 18, 2023 | 16 | mit | JavaScript | |
Datatable for React based on material-ui's table with additional features |
FixedDataTable is a React component for building and presenting data in a flexible, powerful way. It supports standard table features, like headers, columns, rows, header groupings, and both fixed-position and scrolling columns.
The table was designed to handle thousands of rows of data without sacrificing performance. Scrolling smoothly is a first-class goal of FixedDataTable and it's architected in a way to allow for flexibility and extensibility.
Features of FixedDataTable:
Things the FixedDataTable doesn't do:
This version of FixedDataTable is maintained by Schrödinger, Inc. It is a forked version of Facebook’s FixedDataTable Repository available here available under the BSD License. Contributions and modifications to FixedDataTable are also subject to the BSD License (see here).
Install fixed-data-table-2
using npm.
npm install fixed-data-table-2
Add the default stylesheet dist/fixed-data-table.css
using a link tag or import it with a CSS module.
Implementing a table involves three component types- <Table/>
,<Column/>
, and <Cell/>
.
<Table />
contains configuration information for the entire table, like dimensions and row count.
const rows =[0,1,2];
<Table
rowHeight={50}
rowsCount={100}
width={5000}
height={5050}
headerHeight={50}
...
</Table>
<Column />
defines the way data is displayed for one column in the table, including all cell behavior for that column. Rather than manipulating each cell directly, pass a cell component as a prop to the column, and the column will render a cell for each index in the data array.
<Column
header={<Cell>Col 1</Cell>}
cell={<Cell>Column 1</Cell>}
width={2000}
/>
The cell components in a column will receive the current array index of your data as a prop (this.props.rowIndex
). Use this to access the correct value for each cell.
const rows = [0,1,2];
<Column
header={<Cell>Column 1</Cell>}
cell={({rowIndex, ...props}) => (
<Cell {...props}>
{rows[rowIndex]}
</Cell>
)}
width={2000}
/>
If your data is an array of objects, define a columnKey
prop for each column and it too will be passed to all cells in that column.
const rows = [
{ someKey: "someValue" },
{ someKey: "anotherValue" },
{ someKey: "yetAnother" }
];
<Column
header={<Cell>Col 1</Cell>}
columnKey="someKey"
cell={({ rowIndex, columnKey, ...props }) =>
<Cell {...props}>
{rows[rowIndex][columnKey]}
</Cell>}
width={2000}
/>;
You may find it useful to define custom Cell components, which can also be passed to the Column:
const MyCustomCell = ({ isSpecial }) =>
<Cell>
{isSpecial ? "I'm Special" : "I'm Not Special"}
</Cell>;
<Column
header={<Cell>Col 3</Cell>}
cell={<MyCustomCell isSpecial/>}
width={2000}
/>
For more detailed examples, please see the examples section of the documentation. If you need help getting started with a React build system, we recommend create-react-app.
import React from 'react';
import ReactDOM from 'react-dom';
import {Table, Column, Cell} from 'fixed-data-table-2';
import 'fixed-data-table-2/dist/fixed-data-table.css';
// Table data as a list of array.
const rows = [
"first row",
"second row",
"third row"
// .... and more
];
// Custom cell implementation with special prop
const MyCustomCell = ({ mySpecialProp }) =>
<Cell>
{mySpecialProp === "column2" ? "I'm column 2" : "I'm not column 2"}
</Cell>;
// Render your table
ReactDOM.render(
<Table
rowHeight={50}
rowsCount={rows.length}
width={5000}
height={5000}
headerHeight={50}>
<Column
header={<Cell>Col 1</Cell>}
cell={<Cell>Column 1 static content</Cell>}
width={2000}
/>
<Column
header={<Cell>Col 2</Cell>}
cell={<MyCustomCell mySpecialProp="column2" />}
width={1000}
/>
<Column
header={<Cell>Col 3</Cell>}
cell={({rowIndex, ...props}) => (
<Cell {...props}>
Data for column 3: {rows[rowIndex]}
</Cell>
)}
width={2000}
/>
</Table>,
document.getElementById('example')
);
Chrome | Firefox | IE | Safari |
---|---|---|---|
Latest | Latest | 11+ | Unsupported* |
Use GitHub issues for requests.
We actively welcome pull requests; learn how to contribute.
BY CONTRIBUTING TO FIXEDDATATABLE, YOU AGREE THAT YOUR CONTRIBUTIONS WILL BE LICENSED UNDER THE BSD LICENSE (see here). Furthermore, by contributing to FixedDataTable, you hereby grant to Schrödinger and any recipients of your contributions, including but not limited to users of this site, a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, use, make and distribute your contributions and any derivative works under all intellectual property rights including but not limited to copyright and patent. BY CONTRIBUTING TO FIXEDDATATABLE, YOU REPRESENT AND WARRANT THAT YOU ARE LEGALLY ENTITLED TO GRANT THE FOREGOING LICENSE.
Changes are tracked as GitHub releases.
FixedDataTable
is BSD-licensed. We also provide an additional patent grant.