# fixed-data-table

> A React table component designed to allow presenting thousands of rows of data.

Latest version **0.6.5** (published 2017-10-27) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install fixed-data-table
pnpm add fixed-data-table
yarn add fixed-data-table
bun add fixed-data-table
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.6.5 |
| Published | 2017-10-27 |
| First published | 2015-01-29 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | separate (@types/fixed-data-table) |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4262 |
| Maintainers | fb, zpao |
| Keywords | react, react-component, table, data-table, fixed-table |

## Links

- npm: https://www.npmjs.com/package/fixed-data-table
- Repository: https://github.com/facebook/fixed-data-table
- Homepage: http://facebook.github.io/fixed-data-table
- Issues: https://github.com/facebook/fixed-data-table/issues
- npm.io page: https://npm.io/package/fixed-data-table

## Dependencies (2)

- [prop-types](https://npm.io/package/prop-types.md) ^15.5.0
- [create-react-class](https://npm.io/package/create-react-class.md) ^15.6.2

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 0.6.5 (latest) — 2017-10-27
- 0.6.4 — 2017-04-26
- 0.6.3 — 2016-07-29
- 0.6.2 — 2016-07-18
- 0.6.1 — 2016-06-21
- 0.6.0 — 2015-11-14
- 0.6.0-rc1 — 2015-11-11
- 0.5.0 — 2015-10-28
- 0.5.0-rc1 — 2015-10-27
- 0.4.7 — 2015-09-30
- 0.4.6 — 2015-08-17
- 0.4.5 — 2015-08-17
- 0.4.4 — 2015-08-12
- 0.4.3 — 2015-08-12
- 0.4.2 — 2015-08-11
- … 7 more at https://npm.io/package/fixed-data-table/versions

## README

Fixed Data Tables for React
====================================

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:
* Fixed headers and footer
* Both fixed and scrollable columns
* Handling huge amounts of data
* Variable row heights (with adaptive scroll positions)
* Column resizing
* Performant scrolling
* Customizable styling
* Jumping to a row or column
* Controlled scroll API allows touch support

Things the FixedDataTable **doesn't** do:
* FixedDataTable does not provide a layout reflow mechanism or calculate content layout information such as width and height of the cell contents. The developer has to provide the layout information to the table instead.
* FixedDataTable does not handle sorting of data. Instead it allows the developer to supply data getters that can be sort-, filter-, or tail-loading-aware.
* FixedDataTable does not fetch the data (see above)

Getting started
---------------

Install `fixed-data-table` using npm.

```shell
npm install fixed-data-table
```
Add the default stylesheet `dist/fixed-data-table.css`, then import it into any module.

### Basic Example

```javascript
import React from 'react';
import ReactDOM from 'react-dom';
import {Table, Column, Cell} from 'fixed-data-table';

// Table data as a list of array.
const rows = [
  ['a1', 'b1', 'c1'],
  ['a2', 'b2', 'c2'],
  ['a3', 'b3', 'c3'],
  // .... and more
];

// 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][2]}
        </Cell>
      )}
      width={2000}
    />
  </Table>,
  document.getElementById('example')
);
```

Contributions
------------

Use [GitHub issues](https://github.com/facebook/fixed-data-table/issues) for requests.

We actively welcome pull requests; learn how to [contribute](https://github.com/facebook/fixed-data-table/blob/master/CONTRIBUTING.md).


Changelog
---------

Changes are tracked as [GitHub releases](https://github.com/facebook/fixed-data-table/releases).


License
-------

`FixedDataTable` is [BSD-licensed](https://github.com/facebook/fixed-data-table/blob/master/LICENSE). We also provide an additional [patent grant](https://github.com/facebook/fixed-data-table/blob/master/PATENTS).

---
_Source: https://npm.io/package/fixed-data-table · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
