Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ocr-react-datatable

Package Overview
Dependencies
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ocr-react-datatable

Package for datatable's creation (React)

  • 1.7.23
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

OCR-React-Datatable

OCR-React-Datatable is a React component that renders a sortable and paginated table. It can be customized with the headers and data that you provide.

Installation

You can install the package using npm:

npm install ocr-react-datatable

Usage

import ReactDataTable from 'ocr-react-datatable';

const data = [
  [1, 'John', 'Doe'],
  [2, 'Jane', 'Doe'],
  [3, 'Bob', 'Smith'],
  [4, 'Alice', 'Johnson'],
];

const headers = [
  { name: 'ID', type: 'number', isActive: false, sens: 1 },
  { name: 'First Name', type: 'string', isActive: false, sens: 1 },
  { name: 'Last Name', type: 'string', isActive: false, sens: 1 },
];

function App() {
  return (
    <div>
      <h1>OCR React Datatable</h1>
      <ReactDataTable data={data} headers={headers} />
    </div>
  );
}

export default App;

API

ReactDataTable

The ReactDataTable component takes in the following props:

data

Type: Array

An array of arrays containing the data to be displayed in the table.

headers

Type: Array

An array of objects representing the headers of the table. Each object should have a name, type, isActive, and sens property.

name: The name of the header type: The type of data in the column. Currently supported types are number, string, and boolean. isActive: Whether the column is currently being sorted by. sens: The direction to sort the column by. 1 for ascending and -1 for descending. debug Type: Boolean

A flag indicating whether to output debug information to the console.

Contributing

We welcome contributions to OCR React Datatable! To get started, clone the repository and install the dependencies:

git clone https://github.com/your-username/ocr-react-datatable.git
cd ocr-react-datatable
npm install

Then, you can run the tests with:

npm test

License

OCR React Datatable is licensed under the MIT License.

Keywords

FAQs

Package last updated on 07 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc