# react-basic-datatable

> A basic datatable for React with sort, filter and search

Latest version **0.1.7** (published 2021-12-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-basic-datatable
pnpm add react-basic-datatable
yarn add react-basic-datatable
bun add react-basic-datatable
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.7 |
| Published | 2021-12-17 |
| First published | 2021-12-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 0 |
| Unpacked size | 138.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | aiibe |
| Maintainers | aiibe |
| Keywords | pagination, react, react-component, react-datatable, table, datatable, column, sort, data |

## Links

- npm: https://www.npmjs.com/package/react-basic-datatable
- Repository: https://github.com/aiibe/react-basic-datatable
- Homepage: https://github.com/aiibe/react-basic-datatable#readme
- Issues: https://github.com/aiibe/react-basic-datatable/issues
- npm.io page: https://npm.io/package/react-basic-datatable

## 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.1.7 (latest) — 2021-12-17
- 0.1.6 — 2021-12-17
- 0.1.5 — 2021-12-17
- 0.1.4 — 2021-12-17
- 0.1.3 — 2021-12-17
- 0.1.2 — 2021-12-17
- 0.1.1 — 2021-12-17
- 0.1.0 — 2021-12-15

## README

# React Basic Datatable

A basic version of [Datatables](https://datatables.net/) for React written in Typescript.

## Features

- Pagination with custom number of entries showed per page
- Full-Text Search (multiple words)
- Sort by column (limited to string type only)

## Installation

- React >=16 is required

```bash
npm i react-basic-datatable
```

## Usage

_App.jsx_

```javascript
import { DataTable } from 'react-basic-datatable'

// Define columns, each field's name should match the data
const columns = [
  { label: "First Name", field: "firstName" },
  { label: "Last Name", field: "lastName" },
  { label: "Date of Birth", field: "birthDate" },
  { label: "City", field: "city" },
]

// Define your data rows
const rows = [
  {
    "firstName": "Molli",
    "lastName": "Keeton",
    "birthDate": "11/30/2001",
    "city": "Washington",
  },
  {
    "firstName": "Norris",
    "lastName": "Langridge",
    "birthDate": "12/31/1997",
    "city": "Indianapolis",
  },
  ...
]

// (Optional) Show entries per page, default is [10, 25, 50, 100]
const showingLength = [5, 10, 15]

function App(){
 return <DataTable columns={columns} rows={rows} showingLength={showingLength}/>
}

```

## Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## License

[MIT](https://choosealicense.com/licenses/mit/)

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